WebSocketError 枚举


包含可能的 WebSocket 错误列表。Contains the list of possible WebSocket errors.

public enum class WebSocketError
public enum WebSocketError
type WebSocketError = 
Public Enum WebSocketError


ConnectionClosedPrematurely 8

指示连接意外终止。Indicates that the connection was terminated unexpectedly.

Faulted 2

指示常规错误。Indicates a general error.

HeaderError 7

指示在打开握手时分析 HTTP 头时发生一个错误。Indicates an error occurred when parsing the HTTP headers during the opening handshake.

InvalidMessageType 1

指示接收带有未知操作码的一个 WebSocket 帧。Indicates that a WebSocket frame with an unknown opcode was received.

InvalidState 9

指示 WebSocket 对于特定操作是无效状态(例如关闭或放弃)。Indicates the WebSocket is an invalid state for the given operation (such as being closed or aborted).

NativeError 3

指示发生未知本地错误。Indicates that an unknown native error occurred.

NotAWebSocket 4

指示传入请求不是一个合法的 websocket 请求。Indicates that the incoming request was not a valid websocket request.

Success 0

指示异常不存在本地错误信息。Indicates that there was no native error information for the exception.

UnsupportedProtocol 6

指示该客户端请求一个不受支持的 WebSocket subprotocol。Indicates that the client requested an unsupported WebSocket subprotocol.

UnsupportedVersion 5

指示客户端请求 WebSocket 协议的不受支持的版本。Indicates that the client requested an unsupported version of the WebSocket protocol.