WEB_SOCKET_CLOSE_STATUS enumeration

The WEB_SOCKET_CLOSE_STATUS enumeration specifies the WebSocket close status as defined by WSPROTO.

Syntax


typedef enum _WEB_SOCKET_CLOSE_STATUS { 
  WEB_SOCKET_SUCCESS_CLOSE_STATUS                 = 1000,
  WEB_SOCKET_ENDPOINT_UNAVAILABLE_CLOSE_STATUS    = 1001,
  WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS          = 1002,
  WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS       = 1003,
  WEB_SOCKET_EMPTY_CLOSE_STATUS                   = 1005,
  WEB_SOCKET_ABORTED_CLOSE_STATUS                 = 1006,
  WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS         = 1007,
  WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS        = 1008,
  WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS         = 1009,
  WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS  = 1010,
  WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS            = 1011,
  WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS  = 1015
} WEB_SOCKET_CLOSE_STATUS;

Constants

WEB_SOCKET_SUCCESS_CLOSE_STATUS

Close completed successfully.

WEB_SOCKET_ENDPOINT_UNAVAILABLE_CLOSE_STATUS

The endpoint is going away and thus closing the connection.

WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS

Peer detected protocol error and it is closing the connection.

WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS

The endpoint cannot receive this type of data.

WEB_SOCKET_EMPTY_CLOSE_STATUS

No close status code was provided.

WEB_SOCKET_ABORTED_CLOSE_STATUS

The connection was closed without sending or receiving a close frame.

WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS

Data within a message is not consistent with the type of the message.

WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS

The message violates an endpoint's policy.

WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS

The message sent was too large to process.

WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS

A client endpoint expected the server to negotiate one or more extensions, but the server didn't return them in the response message of the WebSocket handshake.

WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS

An unexpected condition prevented the server from fulfilling the request.

WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS

The TLS handshake could not be completed.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Websocket.h

See also

WEB_SOCKET_BUFFER

 

 

Community Additions

ADD
Show: