websocket-sharp : WebSocketSharp Namespace

# CloseStatusCode Enum

Contains the values of the status codes for the WebSocket connection closure.

## Syntax

public enum CloseStatusCode

## Remarks

The CloseStatusCode enumeration contains the values of the status codes for the WebSocket connection closure defined in RFC 6455 for the WebSocket protocol.

"Reserved value" must not be set as a status code in a close control frame by an endpoint. It is designated for use in applications expecting a status code to indicate that connection was closed due to a system grounds.

## Members

Member Name | Description
--- | ---
ABNORMAL | Equivalent to close status 1006. Indicates that the connection was closed abnormally. Reserved value.
AWAY | Equivalent to close status 1001. Indicates that an endpoint is "going away".
IGNORE_EXTENSION | Equivalent to close status 1010. Indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.
INCONSISTENT_DATA | Equivalent to close status 1007. Indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message.
INCORRECT_DATA | Equivalent to close status 1003. Indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept.
NO_STATUS_CODE | Equivalent to close status 1005. Indicates that no status code was actually present. Reserved value.
NORMAL | Equivalent to close status 1000. Indicates a normal closure.
POLICY_VIOLATION | Equivalent to close status 1008. Indicates that an endpoint is terminating the connection because it has received a message that violates its policy.
PROTOCOL_ERROR | Equivalent to close status 1002. Indicates that an endpoint is terminating the connection due to a protocol error.
SERVER_ERROR | Equivalent to close status 1011. Indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
TLS_HANDSHAKE_FAILURE | Equivalent to close status 1015. Indicates that the connection was closed due to a failure to perform a TLS handshake. Reserved value.
TOO_BIG | Equivalent to close status 1009. Indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process.
UNDEFINED | Equivalent to close status 1004. Still undefined. Reserved value.

## Requirements

Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)