property IWebSocketConnection.data

Per-connection application state, the socket-lifetime analogue of IRequestContext.state. Use it to attach an authenticated user id, a tenant, or any value later handlers and broadcasts need.

Type

Map<string, unknown>

Usage

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