Pre-defined close codes that can be passed to
WebsocketConnection.close or received from
WebsocketConnection.get_close_code.
However, other codes are also allowed.
normala normal, non-error close
going-awaythe client/server is going away
protocol-errora protocol error occurred
unsupported-datathe endpoint received data of a type that it does not support.
no-statusreserved value indicating that no close code was present; must not be sent.
abnormalreserved value indicating that the connection was closed abnormally; must not be sent.
bad-datathe endpoint received data that was invalid (eg, non-UTF-8 data in a text message).
policy-violationgeneric error code indicating some sort of policy violation.
too-bigthe endpoint received a message that is too big to process.
no-extensionthe client is closing the connection because the server failed to negotiate a required extension.
server-errorthe server is closing the connection because it was unable to fulfill the request.
tls-handshakereserved value indicating that the TLS handshake failed; must not be sent.