Function: routeToRoom()
ts
function routeToRoom(request, options): Promise<Response | null>;Defined in: server/gateway.ts:79
Forwards room traffic to the room's Durable Object: WebSocket upgrades on {prefix}/{roomId}, and plain HTTP requests on {prefix}/{roomId}/..., which reach the room's onHttp hook. Both are authenticated first. Returns null when the URL is not a room URL, so the caller can fall through to its other routes.
Parameters
| Parameter | Type |
|---|---|
request | Request |
options | RouteOptions |
Returns
Promise<Response | null>