LongPolling

data class LongPolling(val limit: Int? = null, val timeout: Int? = DefaultLongPollingTimeout.inWholeSeconds.toInt(), val allowedUpdates: Collection<String>? = null, val retry: LongPolling.Retry? = null)(source)

Long polled configurations.

The meanings of most parameters are similar to those described in getUpdateFlow. The difference is that timeout defaults to DefaultLongPollingTimeout instead of null.

See also

Constructors

Link copied to clipboard
constructor(limit: Int? = null, timeout: Int? = DefaultLongPollingTimeout.inWholeSeconds.toInt(), allowedUpdates: Collection<String>? = null, retry: LongPolling.Retry? = null)

Types

Link copied to clipboard
data class HandleRetry(val strategy: LongPolling.HandleRetryStrategy = HandleRetryStrategy.TIMEOUT_ONLY, val delayMillis: Long = 5000)
Link copied to clipboard
data class Retry(val maxRetries: Int = 3, val delayMillis: Long = 5000, val isDelayMillisMultiplyByRetryTimes: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard

Retry configuration for exception handling for long polling flow. Unlike retry, handleRetry is based on onError in getUpdateFlow.

Link copied to clipboard
val limit: Int? = null
Link copied to clipboard

Retry config. retry is based on the Ktor plugin HttpTimeout implementation.

Link copied to clipboard
val timeout: Int?