Skip to content

WebSocketClose

WebSocketClose = object

Defined in: packages/format-websocket/src/close/websocket-close.ts:6

The payload of a close frame.

readonly code: number | null

Defined in: packages/format-websocket/src/close/websocket-close.ts:11

The status code, or null when the frame carried none — reported to the application as 1005 (no status received), which is never sent.


readonly reason: string

Defined in: packages/format-websocket/src/close/websocket-close.ts:14

UTF-8 text with no meaning to the protocol; at most 123 bytes.