1 #ifndef PROTON_RECONNECT_TIMER_HPP
2 #define PROTON_RECONNECT_TIMER_HPP
28 #include "./internal/export.hpp"
29 #include "./duration.hpp"
30 #include "./timestamp.hpp"
32 #include <proton/type_compat.h>
40 class reconnect_timer {
42 PN_CPP_EXTERN reconnect_timer(uint32_t first = 0, int32_t max = -1, uint32_t increment = 100,
43 bool doubling =
true, int32_t max_retries = -1, int32_t timeout = -1);
47 PN_CPP_EXTERN
void reset();
53 PN_CPP_EXTERN
int next_delay(timestamp now);
56 duration first_delay_;
64 timestamp timeout_deadline_;
71 #endif // PROTON_RECONNECT_TIMER_HPP