Represents a WebSocket
System Object Facilita.Web WebSocketNamespace: Facilita.WebAssembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.8.37 (1.0.0.0)
A WebSocket object is created by calling
CreateWebSocket(Url, Int32).
The WebSocket can then be opened by calling the
Open method. Once the WebSocket has been opened,
then messages can be sent to the server using the
SendMessage(String) method.
Messages arriving from the server can be processed by subscribing to the
ReceivedMessage event.
The following example demonstrates creating and opening a WebSocket.
Url url = new Url("ws://echo.websocket.org/");
WebSocket webSocket = WebBrowser.CreateWebSocket(url, 1);
webSocket.Open();
Url url = new Url("ws://echo.websocket.org/");
WebSocket webSocket = WebBrowser.CreateWebSocket(url, 1);
webSocket.Open();