A named broadcast group of connections — the bidirectional analogue of the SSE plugin's channels.
Connections are removed automatically when they close, so a room never broadcasts to a dead peer.
add(conn: IWebSocketConnection): void
Adds a connection to this room.
remove(conn: IWebSocketConnection): void
Removes a connection from this room.
broadcast(data: string | Uint8Array,options?: RoomBroadcastOptions): void
Sends a frame to every open member, skipping any closed member and any
member named by options.except.
broadcastJson<T>(payload: T,options?: RoomBroadcastOptions): void
Serializes a value to JSON once and broadcasts it as a text frame.