method IWebSocketService.room
IWebSocketService.room(name: string): WebSocketRoom

Returns the named room, creating it on first use.

Creating is the point: the first call for a name registers a room. Use IWebSocketService.peek to read a caller-supplied name without registering anything.

Parameters

name: string

Room name

Return Type

The room

Usage

import { type IWebSocketService } from "common/src/index.ts";