The string WebSocket endpoint, ie, "ws://example.com/socket", "wss://example.com", "/socket" (inherited host & protocol)
Connects the socket, unless already connected.
Returns the current state of the socket.
Disconnects the socket.
A numeric status code to send on disconnect.
A custom reason for the disconnect.
Returns the URL of the websocket.
Retuns true is the connection is open.
Unsubscribe from channels with the specified topic.
Logs the message.
For customized logging, this.logger can be overriden.
Return the next message ref, accounting for overflows
Registers a callback for connection state change events.
A function to be called when the event occurs.
Registers a callback for connection state change events.
A function to be called when the event occurs.
Calls a function any time a message is received.
A function to be called when the event occurs.
Registers a callback for connection state change event.
A function to be called when the event occurs.
Push out a message if the socket is connected.
If the socket is not connected, the message gets enqueued within a local buffer, and sent out when a connection is next established.
Removes a subscription from the socket.
An open subscription.
Sets the JWT access token used for channel subscription authorization and Realtime RLS.
A JWT string.
Generated using TypeDoc
Initializes the Socket.