Exemplo n.º 1
0
 /// <summary>
 /// Flush stdout.
 /// </summary>
 public void Flush()
 {
     if (_connection != null)
     {
         if (!_responseBuffer.IsEmpty())
         {
             _connection.SendStdout(_requestId, _responseBuffer);
             _connection.Flush();
             _responseBuffer.Clear();
         }
     }
 }
Exemplo n.º 2
0
 public void Flush()
 {
     if (_sendingQueue.ByteLength > 0)
     {
         byte opcode = (byte)(_sendingTextMode ? 1 : 2);
         if (_sendingFragment)
         {
             opcode = 0;
         }
         else
         {
             _sendingFragment = true;
         }
         SendFrame(opcode, _sendingMaskMode && !_isserver, false, _sendingQueue);
         _sendingQueue.Clear();
     }
 }