WINHTTP_WEB_SOCKET_CLOSE_STATUS enumeration (winhttp.h)

The WINHTTP_WEB_SOCKET_CLOSE_STATUS enumeration includes the status of a WebSocket close operation.

Syntax

typedef enum _WINHTTP_WEB_SOCKET_CLOSE_STATUS {
  WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS = 1000,
  WINHTTP_WEB_SOCKET_ENDPOINT_TERMINATED_CLOSE_STATUS = 1001,
  WINHTTP_WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS = 1002,
  WINHTTP_WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS = 1003,
  WINHTTP_WEB_SOCKET_EMPTY_CLOSE_STATUS = 1005,
  WINHTTP_WEB_SOCKET_ABORTED_CLOSE_STATUS = 1006,
  WINHTTP_WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS = 1007,
  WINHTTP_WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS = 1008,
  WINHTTP_WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS = 1009,
  WINHTTP_WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS = 1010,
  WINHTTP_WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS = 1011,
  WINHTTP_WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS = 1015
} WINHTTP_WEB_SOCKET_CLOSE_STATUS;

Constants

 
WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS
Value: 1000
The connection closed successfully.
WINHTTP_WEB_SOCKET_ENDPOINT_TERMINATED_CLOSE_STATUS
Value: 1001
The peer is going away and terminating the connection.
WINHTTP_WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS
Value: 1002
A protocol error occurred.
WINHTTP_WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS
Value: 1003
Invalid data received by the peer.
WINHTTP_WEB_SOCKET_EMPTY_CLOSE_STATUS
Value: 1005
The close message was empty.
WINHTTP_WEB_SOCKET_ABORTED_CLOSE_STATUS
Value: 1006
The connection was aborted.
WINHTTP_WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS
Value: 1007
The payload was invalid.
WINHTTP_WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS
Value: 1008
The message violates an endpoint's policy.
WINHTTP_WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS
Value: 1009
The message sent was too large to process.
WINHTTP_WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS
Value: 1010
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.
WINHTTP_WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS
Value: 1011
An unexpected condition prevented the server from
fulfilling the request.
WINHTTP_WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS
Value: 1015
The TLS handshake could not be completed.

Remarks

WINHTTP_WEB_SOCKET_CLOSE_STATUS is used by WinHttpWebSocketClose, WinHttpWebSocketShutdown, and WinHttpWebSocketQueryCloseStatus.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Header winhttp.h

See also

WinHttpWebSocketClose

WinHttpWebSocketQueryCloseStatus

WinHttpWebSocketShutdown