示例#1
0
 public SocketEndPoint(Socket socket)
 {
     senderSession  = new TTLSenderSession(socket);
     receiveSession = new TTLReceiveSession(senderSession);
     receiveSession.Recevice();
     receiveSession.DataReceiveSucess += DataNotify;
 }
示例#2
0
        private const int CacheHostTime            = 10;        //相当于10分钟

        public TTLReceiveSession(TTLSenderSession session)
        {
            senderSession  = session;
            hostQueue      = new ConcurrentDictionary <string, HostReceive>();
            timer          = new System.Timers.Timer();
            timer.Interval = IntervalTime;
            timer.Elapsed += Timer_Elapsed;
            timer.Start();
        }
示例#3
0
 public HostReceive(TTLSenderSession session)
 {
     senderSession = session;
     queue         = new ConcurrentDictionary <int, ReceiveQueue>();
     receiveTime   = new ConcurrentDictionary <int, DateTime>();
 }