public void Send(string text) { if (closed) { throw new IOException("websocket is closed"); } WebSocketFrame frame = new WebSocketFrame(text); byte[] encoded = frame.Encode(); client.GetStream().Write(encoded, 0, encoded.Length); client.GetStream().Flush(); }
public void Send(string text) { if (closed) throw new IOException("websocket is closed"); WebSocketFrame frame = new WebSocketFrame(text); byte[] encoded = frame.Encode(); client.GetStream().Write(encoded, 0, encoded.Length); client.GetStream().Flush(); }