SNode.C
Loading...
Searching...
No Matches
net::config::ConfigPhysicalSocketServer Class Reference

#include <ConfigPhysicalSocketServer.h>

Inheritance diagram for net::config::ConfigPhysicalSocketServer:
Collaboration diagram for net::config::ConfigPhysicalSocketServer:

Public Types

using Socket = ConfigPhysicalSocketServer
 

Public Member Functions

ConfigPhysicalSocketServersetBacklog (int newBacklog)
 
int getBacklog () const
 
ConfigPhysicalSocketServersetAcceptsPerTick (int acceptsPerTickSet)
 
int getAcceptsPerTick () const
 
ConfigPhysicalSocketServersetAcceptTimeout (const utils::Timeval &acceptTimeout)
 
utils::Timeval getAcceptTimeout () const
 
- Public Member Functions inherited from net::config::ConfigPhysicalSocket
const std::map< int, const net::phy::PhysicalSocketOption > & getSocketOptions ()
 
ConfigPhysicalSocketaddSocketOption (int optLevel, int optName, int optValue)
 
ConfigPhysicalSocketaddSocketOption (int optLevel, int optName, const std::string &optValue)
 
ConfigPhysicalSocketaddSocketOption (int optLevel, int optName, const std::vector< char > &optValue)
 
ConfigPhysicalSocketremoveSocketOption (int optName)
 
ConfigPhysicalSocketsetReuseAddress (bool reuseAddress=true)
 
bool getReuseAddress () const
 
ConfigPhysicalSocketsetRetry (bool retry=true)
 
bool getRetry () const
 
ConfigPhysicalSocketsetRetryOnFatal (bool retry=true)
 
bool getRetryOnFatal () const
 
ConfigPhysicalSocketsetRetryTimeout (double sec)
 
double getRetryTimeout () const
 
ConfigPhysicalSocketsetRetryTries (unsigned int tries=0)
 
unsigned int getRetryTries () const
 
ConfigPhysicalSocketsetRetryBase (double base)
 
double getRetryBase () const
 
ConfigPhysicalSocketsetRetryLimit (unsigned int limit)
 
unsigned int getRetryLimit () const
 
ConfigPhysicalSocketsetRetryJitter (double percent)
 
double getRetryJitter () const
 

Protected Member Functions

 ConfigPhysicalSocketServer (ConfigInstance *instance)
 
- Protected Member Functions inherited from net::config::ConfigPhysicalSocket
 ConfigPhysicalSocket (ConfigInstance *instance)
 
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)
 
- Protected Member Functions inherited from net::config::ConfigSection
 ConfigSection (ConfigInstance *instance, const std::string &name, const std::string &description)
 
 ConfigSection (const ConfigSection &)=delete
 
 ConfigSection (ConfigSection &&)=delete
 
ConfigSectionoperator= (const ConfigSection &)=delete
 
ConfigSectionoperator= (ConfigSection &&)=delete
 
CLI::Option * addOption (const std::string &name, const std::string &description)
 
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName)
 
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &additionalValidator)
 
template<typename ValueTypeT >
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue)
 
template<typename ValueTypeT >
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &additionalValidator)
 
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName)
 
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &additionalValidator)
 
template<typename ValueTypeT >
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue)
 
template<typename ValueTypeT >
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &additionalValidator)
 
CLI::Option * addFlagFunction (const std::string &name, const std::function< void()> &callback, const std::string &description, const std::string &typeName, const std::string &defaultValue)
 
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)
 
void required (CLI::Option *opt, bool req=true)
 
bool required () const
 
template<typename ValueType >
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue)
 
template<typename ValueType >
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue, const CLI::Validator &additionalValidator)
 
template<typename ValueType >
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue)
 
template<typename ValueType >
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName, ValueType defaultValue, const CLI::Validator &additionalValidator)
 

Private Types

using Super = ConfigPhysicalSocket
 

Private Attributes

CLI::Option * backlogOpt = nullptr
 
CLI::Option * acceptsPerTickOpt = nullptr
 
CLI::Option * acceptTimeoutOpt = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from net::config::ConfigSection
CLI::App * section = nullptr
 

Detailed Description

Definition at line 40 of file ConfigPhysicalSocketServer.h.

Member Typedef Documentation

◆ Socket

◆ Super

Constructor & Destructor Documentation

◆ ConfigPhysicalSocketServer()

net::config::ConfigPhysicalSocketServer::ConfigPhysicalSocketServer ( ConfigInstance * instance)
explicitprotected

Definition at line 32 of file ConfigPhysicalSocketServer.cpp.

33 : Super(instance) {
35 "--backlog",
36 "Listen backlog",
37 "backlog",
38 BACKLOG,
39 CLI::PositiveNumber);
40
42 "--accepts-per-tick",
43 "Accepts per tick",
44 "number",
45 ACCEPTS_PER_TICK,
46 CLI::PositiveNumber);
47
49 "--accept-timeout",
50 "Accept timeout",
51 "timeout",
52 ACCEPT_TIMEOUT,
53 CLI::NonNegativeNumber);
54 }
CLI::Option * addOption(const std::string &name, const std::string &description)

Member Function Documentation

◆ getAcceptsPerTick()

int net::config::ConfigPhysicalSocketServer::getAcceptsPerTick ( ) const

Definition at line 68 of file ConfigPhysicalSocketServer.cpp.

68 {
69 return acceptsPerTickOpt->as<int>();
70 }

◆ getAcceptTimeout()

utils::Timeval net::config::ConfigPhysicalSocketServer::getAcceptTimeout ( ) const

Definition at line 88 of file ConfigPhysicalSocketServer.cpp.

88 {
89 return acceptTimeoutOpt->as<utils::Timeval>();
90 }

◆ getBacklog()

int net::config::ConfigPhysicalSocketServer::getBacklog ( ) const

Definition at line 56 of file ConfigPhysicalSocketServer.cpp.

56 {
57 return backlogOpt->as<int>();
58 }

◆ setAcceptsPerTick()

ConfigPhysicalSocketServer & net::config::ConfigPhysicalSocketServer::setAcceptsPerTick ( int acceptsPerTickSet)

Definition at line 72 of file ConfigPhysicalSocketServer.cpp.

72 {
74 ->default_val(acceptsPerTickSet)
75 ->clear();
76
77 return *this;
78 }

◆ setAcceptTimeout()

ConfigPhysicalSocketServer & net::config::ConfigPhysicalSocketServer::setAcceptTimeout ( const utils::Timeval & acceptTimeout)

Definition at line 80 of file ConfigPhysicalSocketServer.cpp.

80 {
82 ->default_val(acceptTimeout)
83 ->clear();
84
85 return *this;
86 }

◆ setBacklog()

ConfigPhysicalSocketServer & net::config::ConfigPhysicalSocketServer::setBacklog ( int newBacklog)

Definition at line 60 of file ConfigPhysicalSocketServer.cpp.

60 {
61 backlogOpt //
62 ->default_val(newBacklog)
63 ->clear();
64
65 return *this;
66 }

Member Data Documentation

◆ acceptsPerTickOpt

CLI::Option* net::config::ConfigPhysicalSocketServer::acceptsPerTickOpt = nullptr
private

Definition at line 62 of file ConfigPhysicalSocketServer.h.

◆ acceptTimeoutOpt

CLI::Option* net::config::ConfigPhysicalSocketServer::acceptTimeoutOpt = nullptr
private

Definition at line 63 of file ConfigPhysicalSocketServer.h.

◆ backlogOpt

CLI::Option* net::config::ConfigPhysicalSocketServer::backlogOpt = nullptr
private

Definition at line 61 of file ConfigPhysicalSocketServer.h.


The documentation for this class was generated from the following files: