### Enumeration

# Soup WebsocketCloseCode

since: 3.0

#### Declaration

    enum Soup.WebsocketCloseCode

#### Description [src]

Pre-defined close codes that can be passed to `soup_websocket_connection_close()` or received from `soup_websocket_connection_get_close_code()`.

However, other codes are also allowed.

Available since: 3.0

#### Members

`SOUP_WEBSOCKET_CLOSE_NORMAL`

  A normal, non-error close.

  - Value: `1000`
  - Nickname: `normal`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_GOING_AWAY`

  The client/server is going away.

  - Value: `1001`
  - Nickname: `going-away`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR`

  A protocol error occurred.

  - Value: `1002`
  - Nickname: `protocol-error`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_UNSUPPORTED_DATA`

  The endpoint received data of a type that it does not support.

  - Value: `1003`
  - Nickname: `unsupported-data`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_NO_STATUS`

  Reserved value indicating that no close code was present; must not be sent.

  - Value: `1005`
  - Nickname: `no-status`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_ABNORMAL`

  Reserved value indicating that the connection was closed abnormally; must not be sent.

  - Value: `1006`
  - Nickname: `abnormal`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_BAD_DATA`

  The endpoint received data that was invalid (eg, non-UTF-8 data in a text message).

  - Value: `1007`
  - Nickname: `bad-data`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_POLICY_VIOLATION`

  Generic error code indicating some sort of policy violation.

  - Value: `1008`
  - Nickname: `policy-violation`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_TOO_BIG`

  The endpoint received a message that is too big to process.

  - Value: `1009`
  - Nickname: `too-big`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_NO_EXTENSION`

  The client is closing the connection because the server failed to negotiate a required extension.

  - Value: `1010`
  - Nickname: `no-extension`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_SERVER_ERROR`

  The server is closing the connection because it was unable to fulfill the request.

  - Value: `1011`
  - Nickname: `server-error`
  - Available since: 3.0
`SOUP_WEBSOCKET_CLOSE_TLS_HANDSHAKE`

  Reserved value indicating that the TLS handshake failed; must not be sent.

  - Value: `1015`
  - Nickname: `tls-handshake`
  - Available since: 3.0