WebSocketAcceptOptions
WebSocketAcceptOptions =
object
Defined in: packages/net-websocket/src/handshake/accept-websocket.ts:16
Options for acceptWebSocket.
Properties
Section titled “Properties”closeTimeoutMs
Section titled “closeTimeoutMs”
readonlycloseTimeoutMs:number
Defined in: packages/net-websocket/src/handshake/accept-websocket.ts:21
See WebSocketPeerOptions.closeTimeoutMs. Required.
headers?
Section titled “headers?”
readonlyoptionalheaders?:HttpHeaders
Defined in: packages/net-websocket/src/handshake/accept-websocket.ts:31
Extra fields for the 101 (or 200) response.
maxMessageSize
Section titled “maxMessageSize”
readonlymaxMessageSize:number
Defined in: packages/net-websocket/src/handshake/accept-websocket.ts:18
See WebSocketPeerOptions.maxMessageSize. Required.
protocols?
Section titled “protocols?”
readonlyoptionalprotocols?: readonlystring[]
Defined in: packages/net-websocket/src/handshake/accept-websocket.ts:28
Subprotocols this server speaks, in its order of preference; the first one the client also offered is chosen. None is chosen when this is omitted or nothing matches — the client then decides whether to go on.