Пример #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>();
 }