Exemple #1
0
 /// <summary>
 ///     Connection have been lost. Reset state and return buffers.
 /// </summary>
 /// <param name="context"></param>
 public void ResetWrite(WriterContext context)
 {
     if (_sendBuffer != WriterContext.EmptySegment)
     {
         context.ReturnBuffer(_sendBuffer);
         _sendBuffer = WriterContext.EmptySegment;
     }
 }
Exemple #2
0
 /// <summary>
 ///     Connection have been lost. Reset state and return buffers.
 /// </summary>
 /// <param name="context"></param>
 public void ResetWrite(WriterContext context)
 {
     if (_writeBuffer.Count != 0)
     {
         context.ReturnBuffer(_writeBuffer);
         _writeBuffer = new ArraySegment <byte>();
     }
 }
        /// <summary>
        ///     Connection have been lost. Reset state and return buffers.
        /// </summary>
        /// <param name="context"></param>
        public void ResetWrite(WriterContext context)
        {
            if (_writeBuffer != WriterContext.EmptySegment)
            {
                context.ReturnBuffer(_writeBuffer);
                _writeBuffer = WriterContext.EmptySegment;
            }

            _writePayloadBufferOffset      = 0;
            _writeBytesLeftCorCurrentState = -1;
        }