protected override void OnHandshaked()
        {
            // Clear WebSocket send/receive buffers
            webSocketNetwork.ClearWsBuffers();

            // Fill the WebSocket upgrade HTTP request
            OnWsConnecting(NetworkRequest);

            // Set empty body of the WebSocket upgrade HTTP request
            NetworkRequest.SetBody();

            // Send the WebSocket upgrade HTTP request
            if (_syncConnect)
            {
                Send(NetworkRequest.Cache.Data);
            }
            else
            {
                SendAsync(NetworkRequest.Cache.Data);
            }
        }
        protected override void OnDisconnected()
        {
            // Disconnect WebSocket
            if (webSocketNetwork.WsHandshaked)
            {
                webSocketNetwork.WsHandshaked = false;
                OnWsDisconnected();
            }

            // Reset WebSocket upgrade HTTP request and response
            NetworkRequest.Clear();
            NetworkResponse.Clear();

            // Clear WebSocket send/receive buffers
            webSocketNetwork.ClearWsBuffers();
        }