ExponentialDelayReconnect

class ExponentialDelayReconnect(val minDelay: ERROR CLASS: Symbol not found for Duration = 1.seconds, val maxDelay: ERROR CLASS: Symbol not found for Duration = 5.minutes, val factor: Double = 1.5) : SocketReconnectPolicy

Implementation of SocketReconnectPolicy that grows the delay exponentially, starting with minDelay until the maximum of maxDelay.

See also

Constructors

Link copied to clipboard
constructor(minDelay: ERROR CLASS: Symbol not found for Duration = 1.seconds, maxDelay: ERROR CLASS: Symbol not found for Duration = 5.minutes, factor: Double = 1.5)

Properties

Link copied to clipboard
Link copied to clipboard
val maxDelay: ERROR CLASS: Symbol not found for Duration
Link copied to clipboard
val minDelay: ERROR CLASS: Symbol not found for Duration

Functions

Link copied to clipboard
open override fun getReconnectDelay(): ERROR CLASS: Symbol not found for Duration

The delay to use before attempting to reconnect or null if no new attempt should be made.

Link copied to clipboard
open override fun notifyConnected()

Notify about a successful connection attempt.

Link copied to clipboard
open override fun notifyDisconnected()

Notify about a disconnect event while there are active subscriptions. This is always called before getReconnectDelay. This function is not called when the WebSocket is disconnected without active subscriptions.

Link copied to clipboard
open override fun notifyUpdated()

Notify about changed credentials. This means a new connection attempt will be made automatically.