Web Socket API

Support for client and server web-socket communications.

Client API

websocket_client_adaptor(request: TSB[WebSocketClientRequest], path: str) TSB[WebSocketResponse][source]
Return type:

TimeSeriesBundleInput[WebSocketResponse]

websocket_client_adaptor_impl(path: str) TSD[int, TSB[WebSocketResponse]][source]
Return type:

TimeSeriesDictInput[int, TimeSeriesBundleInput[WebSocketResponse]]

Server API

websocket_server_handler(fn: Callable = None, *, url: str)[source]
websocket_server_adaptor_helper(path: str, port: int)[source]
class WebSocketConnectRequest(url: str, url_parsed_args: tuple[str, ...] = (), headers: dict[str, str] = frozendict.frozendict({}), cookies: dict[str, dict[str, object]] = frozendict.frozendict({}), auth: object = None)[source]
class WebSocketServerRequest(connect_request: hgraph._types._ts_type.TimeSeriesValueInput[hgraph.adaptors.tornado.websocket_server_adaptor.WebSocketConnectRequest], messages: hgraph._types._ts_type.TimeSeriesValueInput[tuple[STR_OR_BYTES, ...]])[source]
class WebSocketClientRequest(connect_request: hgraph._types._ts_type.TimeSeriesValueInput[hgraph.adaptors.tornado.websocket_server_adaptor.WebSocketConnectRequest], message: hgraph._types._ts_type.TimeSeriesValueInput[STR_OR_BYTES])[source]
class WebSocketResponse(connect_response: hgraph._types._ts_type.TimeSeriesValueInput[bool], message: hgraph._types._ts_type.TimeSeriesValueInput[STR_OR_BYTES])[source]