SNode.C
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
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, 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 optLevel, int optName)
 
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 62 of file ConfigPhysicalSocketServer.h.

Member Typedef Documentation

◆ Socket

◆ Super

Constructor & Destructor Documentation

◆ ConfigPhysicalSocketServer()

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

Definition at line 54 of file ConfigPhysicalSocketServer.cpp.

55 : Super(instance) {
57 "--backlog",
58 "Listen backlog",
59 "backlog",
60 BACKLOG,
61 CLI::PositiveNumber);
62
64 "--accepts-per-tick",
65 "Accepts per tick",
66 "number",
67 ACCEPTS_PER_TICK,
68 CLI::PositiveNumber);
69
71 "--accept-timeout",
72 "Accept timeout",
73 "timeout",
74 ACCEPT_TIMEOUT,
75 CLI::NonNegativeNumber);
76 }
CLI::Option * addOption(const std::string &name, const std::string &description)

References net::config::ConfigPhysicalSocket::ConfigPhysicalSocket().

Here is the call graph for this function:

Member Function Documentation

◆ getAcceptsPerTick()

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

Definition at line 90 of file ConfigPhysicalSocketServer.cpp.

90 {
91 return acceptsPerTickOpt->as<int>();
92 }

References acceptsPerTickOpt.

◆ getAcceptTimeout()

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

Definition at line 110 of file ConfigPhysicalSocketServer.cpp.

110 {
111 return acceptTimeoutOpt->as<utils::Timeval>();
112 }

References acceptTimeoutOpt.

◆ getBacklog()

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

Definition at line 78 of file ConfigPhysicalSocketServer.cpp.

78 {
79 return backlogOpt->as<int>();
80 }

References backlogOpt.

◆ setAcceptsPerTick()

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

Definition at line 94 of file ConfigPhysicalSocketServer.cpp.

94 {
96 ->default_val(acceptsPerTickSet)
97 ->clear();
98
99 return *this;
100 }

References acceptsPerTickOpt.

◆ setAcceptTimeout()

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

Definition at line 102 of file ConfigPhysicalSocketServer.cpp.

102 {
104 ->default_val(acceptTimeout)
105 ->clear();
106
107 return *this;
108 }

References acceptTimeoutOpt.

◆ setBacklog()

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

Definition at line 82 of file ConfigPhysicalSocketServer.cpp.

82 {
83 backlogOpt //
84 ->default_val(newBacklog)
85 ->clear();
86
87 return *this;
88 }

References backlogOpt.

Member Data Documentation

◆ acceptsPerTickOpt

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

Definition at line 84 of file ConfigPhysicalSocketServer.h.

Referenced by getAcceptsPerTick(), and setAcceptsPerTick().

◆ acceptTimeoutOpt

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

Definition at line 85 of file ConfigPhysicalSocketServer.h.

Referenced by getAcceptTimeout(), and setAcceptTimeout().

◆ backlogOpt

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

Definition at line 83 of file ConfigPhysicalSocketServer.h.

Referenced by getBacklog(), and setBacklog().


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