class

Obsctl::Server::ClientRegistry

Inherits Reference < Object

Tracks IPC clients subscribed to pushed state, event, and log topics.

Constants

ALLOWED_TOPICS = Set {"state", "events", "logs"}

Constructors

new

Creates an empty registry.

Source

Instance methods

add(session : IPC::ClientSession, topics : Array(String)) : Nil

Adds or replaces a subscription for a connected client session.

Source
broadcast(topic : String, data : JSON::Any | Nil = nil) : Nil

Broadcasts a topic event to all matching subscribers.

Source
client_count

Returns the current number of registered client sessions.

Source
remove(session : IPC::ClientSession) : Nil

Removes a client session from the registry.

Source

Nested types