Example #1
0
			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);
			}
Example #2
0
            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);
            }