diff options
author | Ben Pfaff <blp@nicira.com> | 2009-12-17 13:46:16 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-01-04 09:47:01 -0800 |
commit | a85c0bbcfd19fcd88ee9966a86dd83107dfd6603 (patch) | |
tree | d16164fc8a5ca6fcdbb9546c5e1e21c27bd33d9c /lib/reconnect.h | |
parent | b8781ff08d9981258e75789c6f4ed18a56991577 (diff) |
reconnect: Add connection attempt limiting feature.
Sometimes it is useful to limit the number of connection attempts, either
from policy or because it is not possible to reconnect at all (e.g. because
a connection was accepted from a listening socket instead of made with
connect()). This commit adds that feature.
Diffstat (limited to 'lib/reconnect.h')
-rw-r--r-- | lib/reconnect.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/reconnect.h b/lib/reconnect.h index 3442c07a..76c7f78e 100644 --- a/lib/reconnect.h +++ b/lib/reconnect.h @@ -42,6 +42,9 @@ int reconnect_get_min_backoff(const struct reconnect *); int reconnect_get_max_backoff(const struct reconnect *); int reconnect_get_probe_interval(const struct reconnect *); +void reconnect_set_max_tries(struct reconnect *, unsigned int max_tries); +unsigned int reconnect_get_max_tries(struct reconnect *); + void reconnect_set_backoff(struct reconnect *, int min_backoff, int max_backoff); void reconnect_set_probe_interval(struct reconnect *, int probe_interval); |