1 export const WebSocketCloseEventStatusString
: Record
<WebSocketCloseEventStatusCode
, string> =
3 1000: 'Normal Closure',
5 1002: 'Protocol Error',
6 1003: 'Unsupported Frame Data',
8 1005: 'No Status Received',
9 1006: 'Abnormal Closure',
10 1007: 'Invalid Frame Payload Data',
11 1008: 'Policy Violation',
12 1009: 'Message Too Large',
13 1010: 'Missing Extension',
14 1011: 'Server Internal Error',
15 1012: 'Service Restart',
16 1013: 'Try Again Later',
21 export enum WebSocketCloseEventStatusCode
{
23 CLOSE_GOING_AWAY
= 1001,
24 CLOSE_PROTOCOL_ERROR
= 1002,
25 CLOSE_UNSUPPORTED
= 1003,
26 CLOSE_RESERVED
= 1004,
27 CLOSE_NO_STATUS
= 1005,
28 CLOSE_ABNORMAL
= 1006,
29 CLOSE_INVALID_PAYLOAD
= 1007,
30 CLOSE_POLICY_VIOLATION
= 1008,
31 CLOSE_TOO_LARGE
= 1009,
32 CLOSE_MISSING_EXTENSION
= 1010,
33 CLOSE_SERVER_INTERNAL_ERROR
= 1011,
34 CLOSE_SERVICE_RESTART
= 1012,
35 CLOSE_TRY_AGAIN_LATER
= 1013,
36 CLOSE_BAD_GATEWAY
= 1014,
37 CLOSE_TLS_HANDSHAKE
= 1015,
40 export interface WSError
extends Error {