System.Net.WebSockets Namespace

The System.Net.WebSockets namespace provides a managed implementation of the WebSocket interface for developers.

Remarks

Some of the classes in the System.Net.WebSockets namespace are supported on Windows 7, Windows Vista SP2, and Windows Server 2008. However, the only public implementations of client and server WebSockets are supported on Windows 8 and Windows Server 2012. The classes and class elements in the System.Net.WebSockets namespace that are supported on Windows 7, Windows Vista SP2, and Windows Server 2008 are abstract classes. This allows an application developer to inherit and extend these abstract classes with an actual implementation of client WebSockets.

Classes

TypeReason
ClientWebSocket

Provides a client for connecting to WebSocket services.

ClientWebSocketOptions

Options to use with a System.Net.WebSockets.ClientWebSocket object.

HttpListenerWebSocketContext

Provides access to information received by the System.Net.HttpListener class when accepting WebSocket connections.

WebSocket

The WebSocket class allows applications to send and receive data after the WebSocket upgrade has completed.

WebSocketCloseStatus

Represents well known WebSocket close codes as defined in tp://www.rfc-editor.org/rfc/rfc6455.txt of the WebSocket protocol spec.

WebSocketContext

Used for accessing the information in the WebSocket handshake.

WebSocketError

Contains the list of possible WebSocket errors.

WebSocketException

Represents an exception that occurred when performing an operation on a WebSocket connection.

WebSocketMessageType

Indicates the message type.

WebSocketReceiveResult

An instance of this class represents the result of performing a single ReceiveAsync operation on a WebSocket.

WebSocketState

Defines the different states a WebSockets instance can be in.