module documentation

WebSocket - WebSocket client and server.

Class WebSocket Synchronous WebSocket client for MicroPython.
Class WebSocketAsync WebSocket implementation that runs in a separate thread.
Exception ConnectionClosed Raised when the connection is closed.
Exception NoDataException Raised when no data is available.
Exception WebSocketError Base exception for WebSocket errors.
Constant WS_CLOSE_BAD_CONDITION Undocumented
Constant WS_CLOSE_BAD_DATA Undocumented
Constant WS_CLOSE_DATA_NOT_SUPPORTED Undocumented
Constant WS_CLOSE_GOING_AWAY Undocumented
Constant WS_CLOSE_MISSING_EXTN Undocumented
Constant WS_CLOSE_OK Undocumented
Constant WS_CLOSE_POLICY_VIOLATION Undocumented
Constant WS_CLOSE_PROTOCOL_ERROR Undocumented
Constant WS_CLOSE_TOO_BIG Undocumented
Constant WS_OP_BYTES Undocumented
Constant WS_OP_CLOSE Undocumented
Constant WS_OP_CONT Undocumented
Constant WS_OP_PING Undocumented
Constant WS_OP_PONG Undocumented
Constant WS_OP_TEXT Undocumented
Function _urlparse Parse a WebSocket URL.
Constant _URL_RE Undocumented
WS_CLOSE_BAD_CONDITION =

Undocumented

Value
const(1011)
WS_CLOSE_BAD_DATA =

Undocumented

Value
const(1007)
WS_CLOSE_DATA_NOT_SUPPORTED =

Undocumented

Value
const(1003)
WS_CLOSE_GOING_AWAY =

Undocumented

Value
const(1001)
WS_CLOSE_MISSING_EXTN =

Undocumented

Value
const(1010)
WS_CLOSE_OK =

Undocumented

Value
const(1000)
WS_CLOSE_POLICY_VIOLATION =

Undocumented

Value
const(1008)
WS_CLOSE_PROTOCOL_ERROR =

Undocumented

Value
const(1002)
WS_CLOSE_TOO_BIG =

Undocumented

Value
const(1009)
WS_OP_BYTES =

Undocumented

Value
const(2)
WS_OP_CLOSE =

Undocumented

Value
const(8)
WS_OP_CONT =

Undocumented

Value
const(0)
WS_OP_PING =

Undocumented

Value
const(9)
WS_OP_PONG =

Undocumented

Value
const(10)
WS_OP_TEXT =

Undocumented

Value
const(1)
def _urlparse(uri: str) -> tuple:

Parse a WebSocket URL.

Parameters
uri:strWebSocket URL (ws:// or wss://).
Returns
tuple(protocol, hostname, port, path) or None if invalid.
_URL_RE =

Undocumented

Value
re.compile(r'(wss|)://([A-Za-z0-9-\.]+)(?::([0-9]+))?(/.+)?')