API reference@evolu/common › WebSocket

WebSocket with auto-reconnect.

Functions

FunctionDescription
testCreateWebSocket-

Interfaces

InterfaceDescription
CreateWebSocketDep-
TestCreateWebSocketCreates a deterministic in-memory CreateWebSocket for testing.
WebSocketWebSocket with auto-reconnect.
WebSocketConnectErrorAn error that occurs when a connection cannot be established due to a network error. Fires before onclose.
WebSocketConnectionCloseErrorAn error that occurs when the connection is closed by the server.
WebSocketConnectionErrorAn error that occurs when an established connection encounters an issue (e.g., failure to send data). Fires before onclose.
WebSocketOptionsOptions for creating WebSocket.
WebSocketSendErrorAn error that occurs when trying to send data but WebSocket is not available or is in the CONNECTING state.

Type Aliases

Type AliasDescription
CreateWebSocketTask that creates a WebSocket.
WebSocketError-
WebSocketReadyStateWebSocket connection states.
WebSocketRetryError-

Variables

VariableDescription
createWebSocketCreate a new WebSocket.