WebSocketCloseStatus WebSocketCloseStatus WebSocketCloseStatus WebSocketCloseStatus Enum

定义

表示在 WebSocket 协议规范的第 11.7 节中定义的常见 WebSocket 关闭代码。Represents well known WebSocket close codes as defined in section 11.7 of the WebSocket protocol spec.

public enum class WebSocketCloseStatus
public enum WebSocketCloseStatus
type WebSocketCloseStatus = 
Public Enum WebSocketCloseStatus
继承
WebSocketCloseStatusWebSocketCloseStatusWebSocketCloseStatusWebSocketCloseStatus

字段

Empty Empty Empty Empty 1005

未指定错误。No error specified.

EndpointUnavailable EndpointUnavailable EndpointUnavailable EndpointUnavailable 1001

(1001)表示终结点正被移除。(1001) Indicates an endpoint is being removed. 服务器或客户端将不可用。Either the server or client will become unavailable.

InternalServerError InternalServerError InternalServerError InternalServerError 1011

(1011) 由于服务器出错,连接将由服务器关闭。(1011) The connection will be closed by the server because of an error on the server.

InvalidMessageType InvalidMessageType InvalidMessageType InvalidMessageType 1003

(1003) 因为无法接受已收到的数据类型,客户端或服务器正在终止连接。(1003) The client or server is terminating the connection because it cannot accept the data type it received.

InvalidPayloadData InvalidPayloadData InvalidPayloadData InvalidPayloadData 1007

(1007)因为已接收到的数据类型与该消息类型不一致,客户端或服务器将停止连接。(1007) The client or server is terminating the connection because it has received data inconsistent with the message type.

MandatoryExtension MandatoryExtension MandatoryExtension MandatoryExtension 1010

(1010) 因为需要服务器协商扩展,客户端正在终止连接。(1010) The client is terminating the connection because it expected the server to negotiate an extension.

MessageTooBig MessageTooBig MessageTooBig MessageTooBig 1009

(1009) 客户端或服务器正在终止连接,因为收到的消息对它而言过大,无法处理。(1009) The client or server is terminating the connection because it has received a message that is too big for it to process.

NormalClosure NormalClosure NormalClosure NormalClosure 1000

(1000) 完成请求后,连接关闭。(1000) The connection has closed after the request was fulfilled.

PolicyViolation PolicyViolation PolicyViolation PolicyViolation 1008

(1008)因为终结点接收了违反其策略的消息,连接将关闭。(1008) The connection will be closed because an endpoint has received a message that violates its policy.

ProtocolError ProtocolError ProtocolError ProtocolError 1002

(1002)由于协议错误,客户端或服务器将停止该连接。(1002) The client or server is terminating the connection because of a protocol error.

适用于