ReconnectPolicy class

An exponential-backoff policy for reconnection attempts.

Constructors

ReconnectPolicy({Duration initial = const Duration(seconds: 1), Duration max = const Duration(seconds: 30), double factor = 2.0})
Creates a reconnect policy.
const

Properties

factor → double
The multiplier applied after each failed attempt.
final
hashCode → int
The hash code for this object.
no setterinherited
initial → Duration
The delay before the first retry.
final
max → Duration
The cap on the delay.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

delayFor(int attempt) → Duration
The delay before retry attempt (0-based).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited