WebSocket connection manager for broadcasting messages to all connected clients
Constants
Log = ::
Log.for("websocket_manager")
Instance methods
Broadcast a message to all connected clients
SourceBroadcast a JSON message to all connected clients
Sourceclient_count
Get the number of connected clients
SourceRegister a new WebSocket connection
Sourcesend_device_status(available :
Bool, device :
String, message :
String |
Nil = nil)
Send device status update to all clients
SourceSend info message to all clients
Sourcesend_warning(message :
String)
Send warning message to all clients
SourceUnregister a WebSocket connection
Source