import type { WsClient } from './WsClient.js'; /** * Registry that maps room names to the set of clients currently in them. * A single WsRoom instance is shared across all WsGateway subclasses * registered via the same WsServiceProvider. */ export declare class WsRoom { private readonly rooms; /** * Add a client to a room. * * @param client - the client to add * @param room - room name */ join(client: WsClient, room: string): void; /** * Remove a client from a room. * * @param client - the client to remove * @param room - room name */ leave(client: WsClient, room: string): void; /** * Remove a client from all rooms. Call on disconnect. * * @param client - the disconnecting client */ removeAll(client: WsClient): void; /** * Broadcast a JSON event to all clients in a room. * Skips clients whose socket is not in OPEN state. * * @param room - room name * @param event - event name * @param payload - JSON-serialisable data */ broadcast(room: string, event: string, payload: unknown): void; /** * Returns the number of connected clients in a room. * * @param room - room name * @returns client count */ size(room: string): number; } //# sourceMappingURL=WsRoom.d.ts.map