Skip to main content

links.websockets

class WebSocketLink(AsyncTerminatingLink)

WebSocketLink is a terminating link that sends operations over websockets using websockets

This is a terminating link, so it should be the last link in the chain. This is a stateful link, keeing a connection open and sending messages over it.

ws_endpoint_url

The endpoint url to connect to

allow_reconnect

Should the websocket try to reconnect if it fails

time_between_retries

The sleep time between retries

max_retries

The maximum amount of retries before giving up

ssl_context

The SSL Context to use for the connection

token_loader

A function that returns the token to use for the connection as a query parameter