public SocketEndPoint(Socket socket) { senderSession = new TTLSenderSession(socket); receiveSession = new TTLReceiveSession(senderSession); receiveSession.Recevice(); receiveSession.DataReceiveSucess += DataNotify; }
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(); }
public HostReceive(TTLSenderSession session) { senderSession = session; queue = new ConcurrentDictionary <int, ReceiveQueue>(); receiveTime = new ConcurrentDictionary <int, DateTime>(); }