WebSocket ClassC# API
Represents a WebSocket
Inheritance Hierarchy

System Object
  Facilita.Web WebSocket

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: (

public class WebSocket

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);
See Also