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
44#include "net/config/ConfigSection.hpp"
46#ifndef DOXYGEN_SHOULD_SKIP_THIS
48#include "utils/Timeval.h"
57namespace net::config {
68 "Auto-reconnection in the event of a connection interruption",
71 CLI::IsMember({
"true",
"false"})
);
73 reconnectTimeOpt = addOption(
75 "Duration after disconnect before reconnect",
78 CLI::NonNegativeNumber);
81 connectTimeoutOpt = addOption(
86 CLI::NonNegativeNumber);
91 ->default_val(reconnect ?
"true" :
"false")
121 ->default_val(connectTimeout)
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)
ConfigPhysicalSocket(ConfigInstance *instance)
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