Ejemplo n.º 1
0
        protected FABSocketChannelAsyncOperation PrepareWriteOperation(ArraySegment <byte> buffer)
        {
            FABSocketChannelAsyncOperation operation = this.WriteOperation;

            operation.SetBuffer(buffer.Array, buffer.Offset, buffer.Count);
            return(operation);
        }
Ejemplo n.º 2
0
        protected void ResetWriteOperation()
        {
            FABSocketChannelAsyncOperation operation = this.writeOperation;

            Contract.Assert(operation != null);
            if (operation.BufferList == null)
            {
                operation.SetBuffer(null, 0, 0);
            }
            else
            {
                operation.BufferList = null;
            }
        }