Soup.WebsocketConnection.get_close_code

### Method

# Soup WebsocketConnectionget_close_code

#### Declaration [src]

    gushort
    soup_websocket_connection_get_close_code (
      SoupWebsocketConnection* self
    )

#### Description [src]

Get the close code received from the WebSocket peer.

This only becomes valid once the WebSocket is in the `SOUP_WEBSOCKET_STATE_CLOSED` state. The value will often be in the `SoupWebsocketCloseCode` enumeration, but may also be an application defined close code.

#### Return value

Type: `gushort`

The close code or zero.