Reconnect Config
data class ReconnectConfig(val maxAttempts: Int = DEFAULT_MAX_ATTEMPTS, val delayStrategy: RetryDelayStrategy = DEFAULT_DELAY_STRATEGY, val shouldReconnect: suspend (exception: Throwable, attempt: Int) -> Boolean = { _, _ -> true }, val afterReconnect: suspend (WebSocketConnection) -> Unit = {})(source)
Configuration for web socket reconnections.
Constructors
Link copied to clipboard
fun ReconnectConfig(maxAttempts: Int = DEFAULT_MAX_ATTEMPTS, delayStrategy: RetryDelayStrategy = DEFAULT_DELAY_STRATEGY, shouldReconnect: suspend (exception: Throwable, attempt: Int) -> Boolean = { _, _ -> true }, afterReconnect: suspend (WebSocketConnection) -> Unit = {})