Encode() public method

public Encode ( ) : byte[]
return byte[]
Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }