Editar

Compartilhar via


System.Net.WebSockets Namespace

Provides a managed implementation of the WebSocket interface for developers.

Classes

ClientWebSocket

Provides a client for connecting to WebSocket services.

ClientWebSocketOptions

Options to use with a ClientWebSocket object.

HttpListenerWebSocketContext

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

WebSocket

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

WebSocketContext

Used for accessing the information in the WebSocket handshake.

WebSocketCreationOptions

Options that control how a WebSocket is created.

WebSocketDeflateOptions

Options to enable per-message deflate compression for WebSocket.

WebSocketException

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

WebSocketProtocol

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

WebSocketReceiveResult

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

Structs

ValueWebSocketReceiveResult

Represents the result of performing a single ReceiveAsync(Memory<Byte>, CancellationToken) operation on a WebSocket.

Enums

WebSocketCloseStatus

Represents well known WebSocket close codes as defined in section 11.7 of the WebSocket protocol spec.

WebSocketError

Contains the list of possible WebSocket errors.

WebSocketMessageFlags

Flags for controlling how the WebSocket should send a message.

WebSocketMessageType

Indicates the message type.

WebSocketState

Defines the different states a WebSockets instance can be in.

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.