ReconnectPolicy class
Exponential backoff with jitter for reconnection.
Constructors
- ReconnectPolicy({Duration initial = const Duration(milliseconds: 500), Duration max = const Duration(seconds: 30), double factor = 2.0, Random? random})
-
Creates a reconnect policy. Pass a seeded
randomfor deterministic jitter in tests.
Properties
Methods
-
nextDelay(
) → Duration - The next backoff delay, advancing the attempt counter.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Resets the backoff after a successful connection.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited