Skip to content

Documents for @litert/websocket / Constants / ECloseReason

Enumeration: ECloseReason

Defined in: src/lib/Constants.ts:20

The reason codes for closing WebSocket connections.

Enumeration Members

ABNORMAL

ABNORMAL: 1006

Defined in: src/lib/Constants.ts:56

Abnormal closure, no further detail available.


BYE

BYE: 1000

Defined in: src/lib/Constants.ts:25

Normally close.


GOING_AWAY

GOING_AWAY: 1001

Defined in: src/lib/Constants.ts:30

The endpoint is going away.


INTERNAL_ERROR

INTERNAL_ERROR: 1011

Defined in: src/lib/Constants.ts:81

Internal server error.


INVALID_PAYLOAD

INVALID_PAYLOAD: 1007

Defined in: src/lib/Constants.ts:61

Invalid frame payload data.


MESSAGE_TOO_BIG

MESSAGE_TOO_BIG: 1009

Defined in: src/lib/Constants.ts:71

Message too big.


MISSING_EXTENSION

MISSING_EXTENSION: 1010

Defined in: src/lib/Constants.ts:76

Missing required protocol extension.


NO_STATUS

NO_STATUS: 1005

Defined in: src/lib/Constants.ts:51

No status code was present.


POLICY_VIOLATION

POLICY_VIOLATION: 1008

Defined in: src/lib/Constants.ts:66

Policy violation.


PROTOCOL_ERROR

PROTOCOL_ERROR: 1002

Defined in: src/lib/Constants.ts:35

Protocol error.


RESERVED

RESERVED: 1004

Defined in: src/lib/Constants.ts:46

Reserved, do not use.

Deprecated


UNSUPPORTED_DATA

UNSUPPORTED_DATA: 1003

Defined in: src/lib/Constants.ts:40

Unsupported data.