public bool FlushOutputStream() { if (!IsConnected()) { return(false); } // return if we're haven't actually written anything to the output blob if (OutStream.WriteCaret <= 0) { return(true); // successfully, do nothing } // flush output data try { _socket.Send(OutStream.Buffer, 0, OutStream.WriteCaret, SocketFlags.None); OutStream.ResetWrite(); return(true); } catch (Exception e) { HandleException(e); } return(false); }