public AsyncQueueReader(InputQueue <T> inputQueue, TimeSpan timeout, AsyncCallback callback, object state)
     : base(callback, state)
 {
     this.inputQueue = inputQueue;
     if (timeout != TimeSpan.MaxValue)
     {
         timer = new Timer(timerCallback, this, timeout, TimeSpan.FromMilliseconds(-1));
     }
 }
示例#2
0
 public AsyncQueueReader(InputQueue <T> inputQueue, TimeSpan timeout, AsyncCallback callback, object state)
     : base(callback, state)
 {
     this.inputQueue = inputQueue;
     if (timeout != TimeSpan.MaxValue)
     {
         timer = new Timer(timerCallback, this, Timeout.Infinite, Timeout.Infinite);
         timer.Change(timeout, Timeout.InfiniteTimeSpan);
     }
 }
示例#3
0
 public QueueBufferedStream(TimeSpan naglingDelay)
 {
     this.naglingDelay = naglingDelay;
     done            = new ManualResetEvent(false);
     DataChunksQueue = new InputQueue <byte[]>();
 }
示例#4
0
 public WaitQueueReader(InputQueue <T> inputQueue)
 {
     this.inputQueue = inputQueue;
     waitEvent       = new ManualResetEvent(false);
 }