Skip to content

WebSocketState

Enumeration of WebSocket connection states.

Defined in: src/utils/websocket.ts:61

Enumeration of WebSocket connection states.

Remarks

These states track the full lifecycle of a managed WebSocket connection, including reconnection phases. The state machine transitions are:

DISCONNECTED -> CONNECTING -> CONNECTED -> CLOSING -> CLOSED
                                   |
                                   v
                             RECONNECTING -> CONNECTING -> ...

Enumeration Members

Enumeration MemberValueDescriptionDefined in
CLOSED"closed"The connection has been gracefully closed. Terminal state.src/utils/websocket.ts:73
CLOSING"closing"A graceful close has been initiated and is in progress.src/utils/websocket.ts:71
CONNECTED"connected"WebSocket is open and ready to send/receive data.src/utils/websocket.ts:67
CONNECTING"connecting"Connection attempt is in progress.src/utils/websocket.ts:65
DISCONNECTED"disconnected"No active connection. Initial state and state after unexpected disconnection.src/utils/websocket.ts:63
RECONNECTING"reconnecting"Automatic reconnection is in progress after an unexpected disconnection.src/utils/websocket.ts:69

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency