Skip to main content
method WebSocket.close
private
WebSocket.close(
code?: number,
reason?: string,
): void
Deprecated

Closes the WebSocket connection, optionally using code as the WebSocket connection close code and reason as the WebSocket connection close reason.

Parameters

optional
code: number
optional
reason: string

Return Type

void
Back to top