Broker defines a struct for managing subscriptions clients.
ChunkedClients splits the current clients into a chunked slice.
ClientById finds a registered client by its id.
Returns non-nil error when client with clientId is not registered.
Clients returns a shallow copy of all registered clients indexed with their connection id.
Register adds a new client to the broker instance.
TotalClients returns the total number of registered clients.
Unregister removes a single client by its id and marks it as discarded.
If client with clientId doesn't exist, this method does nothing.
Generated using TypeDoc
Broker defines a struct for managing subscriptions clients.