ClientManager
Manages connected clients and their WebSocket sessions.
Functions
Assigns a role to a client.
Broadcasts the current client list to all connected clients. Includes both real clients and ghost devices.
Broadcasts a ghost device's events to all listeners.
Broadcasts a message to all listeners of a publisher.
Gets all connected clients including ghost devices.
Gets information about a specific client.
Gets the current publisher ID.
Gets a ghost device by ID.
Checks if a client ID belongs to a ghost device.
Registers a new client connection.
Registers a ghost device from an imported session. Ghost devices can be played back and will broadcast events to listeners.
Removes a ghost device.
Sends a message to the publisher client.
Sets the current publisher. Only one publisher is allowed at a time. If the new publisher is a real device and there's a ghost publisher, the ghost is removed.
Unregisters a client and removes all subscriptions.