WebsocketConnection.getCloseCode

ushort getCloseCode()

Get the close code received from the WebSocket peer.

This only becomes valid once the WebSocket is in the [soup.types.WebsocketState.Closed] state. The value will often be in the enumWebsocketCloseCode enumeration, but may also be an application defined close code.

Returns

the close code or zero.