Creates a new WebsocketBuilder.
the url to connect to
Private
Optional
_optionsPrivate
Optional
_protocolsPrivate
Readonly
_urlGetter for the buffer.
the buffer, undefined if no buffer has been set
Getter for wether to reconnect immediately after a connection has been lost, ignoring the backoff strategy for the first retry.
wether to reconnect immediately after a connection has been lost, undefined if no value has been set
Getter for the maximum number of retries before giving up.
the maximum number of retries before giving up, undefined if no maximum has been set
Getter for the protocols.
the protocols, undefined if no protocols have been set
Getter for the url.
the url
Private
addAdds an event listener to the options.
the event to add the listener to
the listener to add
Optional
options: WebsocketEventListenerOptionsthe listener options
Adds an 'close' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be called in the order they were added.
the listener to add
Optional
options: WebsocketEventListenerOptionsthe listener options
Adds an 'error' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be called in the order they were added.
the listener to add
Optional
options: WebsocketEventListenerOptionsthe listener options
Adds an 'message' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be called in the order they were added.
the listener to add
Optional
options: WebsocketEventListenerOptionsthe listener options
Adds an 'open' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be called in the order they were added.
the listener to add
Optional
options: WebsocketEventListenerOptionsthe listener options
Adds an 'reconnect' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be called in the order they were added.
the listener to add
Optional
options: WebsocketEventListenerOptionsthe listener options
Adds an 'retry' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be called in the order they were added.
the listener to add
Optional
options: WebsocketEventListenerOptionsthe listener options
Adds a backoff to the websocket. Subsequent calls to this method will override the previously set backoff.
the backoff to add
Adds a buffer to the websocket. Subsequent calls to this method will override the previously set buffer.
the buffer to add
Sets wether to reconnect immediately after a connection has been lost, ignoring the backoff strategy for the first retry.
wether to reconnect immediately after a connection has been lost
Sets the maximum number of retries before giving up. No limit if undefined.
the maximum number of retries before giving up
Adds protocols to the websocket. Subsequent calls to this method will override the previously set protocols.
the protocols to add
Generated using TypeDoc
Builder for websockets.