跳转到内容
简体中文

WebsocketUpgradeInfo

此内容尚不支持你的语言。

WebsocketUpgradeInfo = object

Defined in: src/http/websocket/types.ts:20

Snapshot of the HTTP upgrade request, exposed on every connection so handlers can read the path, params, query, headers and negotiated subprotocol without holding a backend-specific request object.

readonly headers: Readonly<Record<string, string>>

Defined in: src/http/websocket/types.ts:25


readonly params: Readonly<Record<string, string>>

Defined in: src/http/websocket/types.ts:23

Path parameters extracted from /room/:id-style patterns.


readonly path: string

Defined in: src/http/websocket/types.ts:21


readonly query: Readonly<Record<string, string | string[] | undefined>>

Defined in: src/http/websocket/types.ts:24


readonly optional remoteAddress?: string

Defined in: src/http/websocket/types.ts:27

Remote peer address as the server saw it (not x-forwarded-for).


readonly optional subprotocol?: string

Defined in: src/http/websocket/types.ts:29

Negotiated Sec-WebSocket-Protocol, if any.