WebSocketException
A WebSocket exception you can raise in your own code to show errors to the client.
Attributes
| Attribute | Type | Description |
|---|---|---|
| code | int | A closing code from the valid codes defined in the specification. |
| reason | `str | None` = None |
Constructor
Signature
def WebSocketException(
code: int,
reason: str | None = None
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| code | int | A closing code from the valid codes defined in the WebSocket specification (RFC 6455). |
| reason | `str | None` = None |
Signature
def WebSocketException(
code: int,
reason: str | None = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| code | int | A closing code from the valid codes defined in the RFC 6455 specification section 7.4.1. |
| reason | `str | None` = None |