ReconnectConfig class

Configuration for WebSocketResultHandler's exponential-backoff reconnect loop.

Constructors

ReconnectConfig({bool enabled = true, Duration initialDelay = const Duration(seconds: 1), Duration maxDelay = const Duration(seconds: 30), double backoffFactor = 2.0, int? maxAttempts})
Creates a reconnect config.
const
ReconnectConfig.disabled()
Disables reconnect entirely.
const

Properties

backoffFactor → double
Multiplier applied after each failed attempt.
final
enabled → bool
Whether to attempt reconnects after an unexpected close / error.
final
hashCode → int
The hash code for this object.
no setterinherited
initialDelay → Duration
Delay before the first reconnect attempt.
final
maxAttempts → int?
Maximum number of reconnect attempts. null means retry forever.
final
maxDelay → Duration
Upper bound on the delay between attempts.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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