WebSocketState 枚举


定义 WebSockets 事例可能性的不同状态。Defines the different states a WebSockets instance can be in.

public enum class WebSocketState
public enum WebSocketState
type WebSocketState = 
Public Enum WebSocketState


Aborted 6

留待将来使用。Reserved for future use.

Closed 5

指示正常完成 WebSocket 关闭握手。Indicates the WebSocket close handshake completed gracefully.

CloseReceived 4

自该远程终结点接收的关闭消息。A close message was received from the remote endpoint.

CloseSent 3

向远程终结点发送了关闭消息。A close message was sent to the remote endpoint.

Connecting 1

连接到远程终结点处的链接。The connection is negotiating the handshake with the remote endpoint.

None 0

留待将来使用。Reserved for future use.

Open 2

在 HTTP 握手完成之后的初始状态。The initial state after the HTTP handshake has been completed.