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
42#include "net/in/stream/config/ConfigSocketServer.h"
44#include "net/config/stream/ConfigSocketServer.hpp"
46#ifndef DOXYGEN_SHOULD_SKIP_THIS
48#include "core/system/netdb.h"
50#include <netinet/in.h>
51#include <netinet/tcp.h>
58namespace net::in::stream::
config {
68 "--reuse-address{true}",
71 "Reuse socket address",
74 CLI::IsMember({
"true",
"false"})
);
83 CLI::IsMember({
"true",
"false"})
);
86 "--disable-nagle-algorithm{true}",
89 "Turn of Nagle algorithm",
92 CLI::IsMember({
"true",
"false",
"default"})
);
93 if (std::string(
XSTR(IN6_SERVER_DISABLE_NAGLE_ALGORITHM)) ==
"default") {
134 if (disableNagleAlgorithm) {
ConfigPhysicalSocket & addSocketOption(int optLevel, int optName, int optValue)
CLI::Option * addSocketOption(const std::string &name, int optLevel, int optName, const std::string &description, const std::string &typeName, const std::string &defaultValue, const CLI::Validator &validator)
ConfigSocketServer(net::config::ConfigInstance *instance)
ConfigAddress & setAiSockType(int aiSockType)
ConfigAddress & setPortRequired(bool required=true)
ConfigAddress & setAiFlags(int aiFlags)
ConfigAddress & setAiProtocol(int aiProtocol)
~ConfigSocketServer() override
CLI::Option * disableNagleAlgorithmOpt
bool getReusePort() const
ConfigSocketServer & setReusePort(bool reusePort=true)
bool getReuseAddress() const
bool getDisableNagleAlgorithm() const
ConfigSocketServer & setReuseAddress(bool reuseAddress=true)
ConfigSocketServer(net::config::ConfigInstance *instance)
CLI::Option * reusePortOpt
ConfigSocketServer & setDisableNagleAlgorithm(bool disableNagleAlgorithm=true)
CLI::Option * reuseAddressOpt
CLI::Option * setDefaultValue(CLI::Option *option, const ValueTypeT &value, bool clear=true) const