struct
XMPP::ReconnectPolicy
- XMPP::ReconnectPolicy
- Struct
- Value
- Object
Overview
Exponential reconnect timing with bounded symmetric jitter.
#delay_for uses a one-based retry number: retry 1 waits #initial_delay,
retry 2 waits initial_delay * multiplier, up to #max_delay.
Defined in:
xmpp/stream_manager.crConstructors
Instance Method Summary
- #delay_for(retry_number : Int32, jitter_sample : Float64 = Random.rand) : Time::Span
- #initial_delay : Time::Span
- #jitter : Float64
- #max_delay : Time::Span
- #multiplier : Float64
Constructor Detail
def self.new(initial_delay : Time::Span = 1.second, max_delay : Time::Span = 30.seconds, multiplier : Float64 = 2.0, jitter : Float64 = 0.2)
#
Instance Method Detail
def delay_for(retry_number : Int32, jitter_sample : Float64 = Random.rand) : Time::Span
#