WebSocketState WebSocketState WebSocketState WebSocketState Enum


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

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


Aborted Aborted Aborted Aborted 6

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

Closed Closed Closed Closed 5

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

CloseReceived CloseReceived CloseReceived CloseReceived 4

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

CloseSent CloseSent CloseSent CloseSent 3

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

Connecting Connecting Connecting Connecting 1

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

None None None None 0

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

Open Open Open Open 2

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