static ClientWebSocket() { // Register ws: and wss: with WebRequest.Register so that WebRequest.Create returns a // WebSocket capable HttpWebRequest instance. WebSocket.RegisterPrefixes(); }