WebSocket
The WebSocket module in DOLOST provides functionality for handling WebSocket connections and communication with clients.
WebSocket endpoints enable real-time bidirectional communication between the DOLOST server and connected clients. These endpoints are used to transmit updates, statistics, and other real-time data to clients without the need for continuous polling.
- class DOLOST.blueprints.websocket.WebSocketNamespace(namespace=None)[source]
Bases:
NamespaceNamespace for WebSocket connections.
- on_connect(*args)[source]
Callback function triggered when a client connects.
- Parameters:
*args – Variable length argument list.
- on_disconnect(*args)[source]
Callback function triggered when a client disconnects.
- Parameters:
*args – Variable length argument list.
- on_request_activity()[source]
Callback function triggered on request for activity logs.
Starts a new thread to continuously send activity logs to clients.