public AsyncSocketHelper(PooledSocket socket) { this.socket = socket; this.asyncBuffer = new SlidingBuffer(ChunkSize); this.readEvent = new SocketAsyncEventArgs(); this.readEvent.Completed += new EventHandler<SocketAsyncEventArgs>(AsyncReadCompleted); this.readEvent.SetBuffer(new byte[ChunkSize], 0, ChunkSize); this.readInProgressEvent = new ManualResetEvent(false); }
public AsyncSocketHelper(AsyncPooledSocket socket) { this.socket = socket; this.asyncBuffer = new SlidingBuffer(ChunkSize); this.readEvent = new SocketAsyncEventArgs(); this.readEvent.Completed += new EventHandler <SocketAsyncEventArgs>(AsyncReadCompleted); this.readEvent.SetBuffer(new byte[ChunkSize], 0, ChunkSize); this.readInProgressEvent = new ManualResetEvent(false); }