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); } }