Edit

Share via


WebSocketError Enum

Definition

Contains the list of possible WebSocket errors.

C#
public enum WebSocketError
Inheritance
WebSocketError

Fields

Name Value Description
Success 0

Indicates that there was no native error information for the exception.

InvalidMessageType 1

Indicates that a WebSocket frame with an unknown opcode was received.

Faulted 2

Indicates a general error.

NativeError 3

Indicates that an unknown native error occurred.

NotAWebSocket 4

Indicates that the incoming request was not a valid websocket request.

UnsupportedVersion 5

Indicates that the client requested an unsupported version of the WebSocket protocol.

UnsupportedProtocol 6

Indicates that the client requested an unsupported WebSocket subprotocol.

HeaderError 7

Indicates an error occurred when parsing the HTTP headers during the opening handshake.

ConnectionClosedPrematurely 8

Indicates that the connection was terminated unexpectedly.

InvalidState 9

Indicates the WebSocket is an invalid state for the given operation (such as being closed or aborted).

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1