Setu-TS
    Preparing search index...

    Interface WebSocketConnectionContext

    Details of the upgrade request that opened a connection, handed to WebSocketHandlers.onOpen.

    Because WebSocket routes match on exact path, variable data travels in the query string and is exposed through WebSocketConnectionContext.query.

    0.2.0

    interface WebSocketConnectionContext {
        headers: Headers;
        path: string;
        protocol?: string;
        query: Readonly<Record<string, string>>;
        url: string;
        user?: IPrincipal;
    }
    Index
    headers: Headers

    The upgrade request headers — read these to authenticate the peer.

    path: string

    The URL path component (no query string).

    protocol?: string

    The negotiated subprotocol, when one was selected.

    query: Readonly<Record<string, string>>

    Query string parameters.

    url: string

    The full upgrade request URL.

    user?: IPrincipal

    The authenticated principal, when one authenticated the upgrade. Populated by threading ctx.request.user through IWebSocketService.routeUpgrade; omitted when the upgrade was not authenticated. Read this in onOpen to identify the peer rather than re-deriving it from the headers.

    0.3.0