Encode() public method

public Encode ( ) : byte[]
return byte[]
Esempio 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();
        }
Esempio 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();
        }