2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
43#include "net/config/ConfigSection.hpp"
45#ifndef DOXYGEN_SHOULD_SKIP_THIS
56 template <
typename ConcretConfigPhysicalSocket>
61 "Automatically retry listen|connect",
64 CLI::IsMember({
"true",
"false"})
);
67 "--retry-on-fatal{true}",
68 "Retry also on fatal errors",
71 CLI::IsMember({
"true",
"false"})
);
76 "Timeout of the retry timer",
79 CLI::NonNegativeNumber
);
84 "Number of retry attempts before giving up (0 = unlimited)",
87 CLI::TypeValidator<
unsigned int>()
);
92 "Base of exponential backoff",
100 "Maximum jitter in percent to apply randomly to calculated retry timeout (0 to disable)",
103 CLI::Range(0., 100.)
);
108 "Upper limit in seconds of retry timeout (0 for infinite)",
111 CLI::NonNegativeNumber
);
~ConfigPhysicalSocketClient() override
CLI::Option * reconnectTimeOpt
ConfigPhysicalSocketClient(ConfigInstance *instance)
CLI::Option * connectTimeoutOpt
CLI::Option * reconnectOpt
ConfigPhysicalSocketClient & setReconnectTime(double time)
bool getReconnect() const
ConfigPhysicalSocketClient & setReconnect(bool reconnect=true)
double getReconnectTime() const
utils::Timeval getConnectTimeout() const
ConfigPhysicalSocketClient & setConnectTimeout(const utils::Timeval &connectTimeout)
static uint16_t retryTries
static float retryTimeout
CLI::Option * retryJitterOpt
CLI::Option * retryBaseOpt
CLI::Option * retryTriesOpt
static const std::string retry
ConfigPhysicalSocket(ConfigInstance *instance, ConcretConfigPhysicalSocketT *section)
CLI::Option * retryOnFatalOpt
CLI::Option * retryTimeoutOpt
CLI::Option * retryLimitOpt
static const std::string retryOnFatal
CLI::Option * addFlag(const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const
CLI::Option * addOption(const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const
CLI::Option * setDefaultValue(CLI::Option *option, const ValueTypeT &value, bool clear=true) const
CLI::Option * addFlagFunction(const std::string &name, const std::function< void()> &callback, const std::string &description, const std::string &typeName, const std::string &defaultValue, const CLI::Validator &validator)
Timeval(double time) noexcept