websockets.client

Functions

acknowledged(→ None)

Wait for an OK from the server.

register(→ None)

Registers for broadcast messages.

authenticate(→ None)

Authenticates with the given token.

broadcast(→ None)

Broadcasts the given message to all connected clients.

status(→ str | None)

Receives the status of the server.

Module Contents

async websockets.client.acknowledged(websocket: websockets.legacy.client.WebSocketClientProtocol) None[source]

Wait for an OK from the server.

async websockets.client.register(websocket: websockets.legacy.client.WebSocketClientProtocol, schema: str, channel: str | None) None[source]

Registers for broadcast messages.

async websockets.client.authenticate(websocket: websockets.legacy.client.WebSocketClientProtocol, token: str) None[source]

Authenticates with the given token.

async websockets.client.broadcast(websocket: websockets.legacy.client.WebSocketClientProtocol, schema: str, channel: str | None, message: onegov.core.types.JSON_ro) None[source]

Broadcasts the given message to all connected clients.

Assumes prior authentication.

async websockets.client.status(websocket: websockets.legacy.client.WebSocketClientProtocol) str | None[source]

Receives the status of the server.

Assumes prior authentication.