Url to connect to.
Optional subprotocols.
The type of close ['FORCE', 'RETRY', 'KILL']
A case-sensitive string representing the event type to listen for.
An options object that specifies characteristics about the event listener.
WebSocket onclose evt.
WebSocket onerror evt.
WebSocket onmessage evt.
WebSocket onopen evt.
Event object.
Raw WebSocket evt we are proxying.
A case-sensitive string representing the event type to listen for.
The object which receives a notification (an object that implements the Event interface) when an event of the specified type occur.
An options object that specifies characteristics about the event listener.
A case-sensitive string representing the event type to listen for.
The object which receives a notification (an object that implements the Event interface) when an event of the specified type occur.
An options object that specifies characteristics about the event listener.
data to send via web socket.
Add a given listener to this event target.
The listener to add.
The options for this listener.
Dispatch a given event.
The event to dispatch.
false
if canceled.
Remove a given listener from this event target.
The listener to remove.
The options for this listener.
Generated using TypeDoc
RcSocket
This behaves like a WebSocket in every way, except if it fails to connect, or it gets disconnected, it will use an exponential backoff until it succesfully connects again.
It is API compatible with the standard WebSocket API.
const ws = new RcSocket(wss://host)