Ejemplo n.º 1
0
        /// <summary>
        /// Disconnects the client from server.
        /// </summary>
        public void Close()
        {
            WebSocketPacket pingPacket = new WebSocketRawPacket(WebSocketFrameType.CLOSE, "Bye");

            pingPacket.SetEndFrame(true);
            SendInternal(WebSocketProtocolAbstraction.RawToProtocolPacket(pingPacket));
        }
Ejemplo n.º 2
0
        private void SendPacketText(string aUTF8String, int aFragmentSize)
        {
            WebSocketPacket lPacket = new WebSocketRawPacket(WebSocketFrameType.TEXT, aUTF8String);

            lPacket.SetEndFrame(true);
            SendInternal(WebSocketProtocolAbstraction.RawToProtocolPacket(lPacket));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Pings the server.
        /// </summary>
        public void Ping()
        {
            WebSocketPacket pingPacket = new WebSocketRawPacket(WebSocketFrameType.PING, "Hello");

            pingPacket.SetEndFrame(true);
            SendInternal(WebSocketProtocolAbstraction.RawToProtocolPacket(pingPacket));
        }