ReadonlyavailableWhether the underlying HTTP adapter can perform WebSocket upgrades.
ReadonlyconnectionCurrent number of open connections across all routes.
ReadonlyroomCurrent number of live rooms.
Returns the named room if one already exists, without creating it.
The non-allocating counterpart to IWebSocketService.room. A
presence or dashboard endpoint that reports size for a name taken from a
request must use this: room(name) registers one room per distinct name
polled, and a room nobody has joined is reclaimed only when some other
connection disconnects — so an idle application never reclaims them.
Room name
The room, or undefined when no room of that name exists
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.
Room name
The room
Registers a WebSocket route. Paths match exactly; the query string is
ignored for matching and exposed to onOpen instead.
The exact URL path to accept upgrades on (e.g. /ws/chat)
The lifecycle callbacks
Optionaloptions: WebSocketRouteOptions
Per-route configuration
OptionalrouteConsults the internal upgrade router for an inbound request. Used by the kernel terminal handler to decide whether to upgrade after the middleware pipeline runs.
The native, undisturbed upgrade request
Optionalprincipal: IPrincipal
The authenticated principal, when the middleware pipeline
produced one (ctx.request.user). Absent when the upgrade was not
authenticated; implementations must treat a missing principal as
anonymous and must not throw on its absence.
The decision, or null to fall through
Service contract for the WebSocket hub — registered by the WebSocketPlugin under
CAPABILITIES.WEBSOCKET.Example
Since
0.2.0