:right-sidebar: True WebsocketCloseCode =================================================================== .. currentmodule:: gi.repository.Soup .. class:: WebsocketCloseCode :no-contents-entry: Pre-defined close codes that can be passed to :obj:`~gi.repository.WebsocketConnection.close` or received from :obj:`~gi.repository.WebsocketConnection.get_close_code`. However, other codes are also allowed. Fields ------ .. rst-class:: interim-class .. class:: WebsocketCloseCode :no-index: .. attribute:: ABNORMAL Reserved value indicating that the connection was closed abnormally; must not be sent. .. attribute:: BAD_DATA The endpoint received data that was invalid (eg, non-UTF-8 data in a text message). .. attribute:: GOING_AWAY The client/server is going away .. attribute:: NORMAL A normal, non-error close .. attribute:: NO_EXTENSION The client is closing the connection because the server failed to negotiate a required extension. .. attribute:: NO_STATUS Reserved value indicating that no close code was present; must not be sent. .. attribute:: POLICY_VIOLATION Generic error code indicating some sort of policy violation. .. attribute:: PROTOCOL_ERROR A protocol error occurred .. attribute:: SERVER_ERROR The server is closing the connection because it was unable to fulfill the request. .. attribute:: TLS_HANDSHAKE Reserved value indicating that the TLS handshake failed; must not be sent. .. attribute:: TOO_BIG The endpoint received a message that is too big to process. .. attribute:: UNSUPPORTED_DATA The endpoint received data of a type that it does not support.