示例#1
0
 public SocketSenderQueue(SocketPoolBase pool, int retryNumber = 3, int retryInterval = 30000)
 {
     this.RetryNumber   = retryNumber;
     this.RetryInterval = retryInterval;
     socketPool         = pool;
     concurrentQueue    = new ConcurrentQueue <SocketSenderArgs>();
     sendTask           = new Task(send);
     sendTask.Start();
 }
        private SocketPoolManager(int heartFreq)
        {
            //初始化内存socket池
            currentPool = new SocketPoolMemory();
            //初始化消息发送器
            CurrentSender = new SocketSenderQueue(currentPool);

            heartTimer = CurrentSender.InitTimingNotify(completeHeartCallback, heartFrequency: heartFreq);
        }