GitHub

WsConnection

API reference for WsConnection.

A websocket that reconnects by itself. take gives each inbound payload, a JSON object; set_url changes where the next connection goes; write sends a payload, or RECONNECT.

Attributes

AttributeTypeDescription
takeEffect[_json.JsonObject]
set_urlCallable[[str], Effect[None]]
writeCallable[[GatewaySend | Reconnect], Effect[None]]

Functions

__init__

__init__(take, set_url, write) -> None
ParameterTypeDescription
takeEffect[_json.JsonObject]
set_urlCallable[[str], Effect[None]]
writeCallable[[GatewaySend | Reconnect], Effect[None]]