#include <ConfigSocketServer.h>
Public Member Functions | |
| ConfigSocketServer & | setReuseAddress (bool reuseAddress=true) |
| bool | getReuseAddress () const |
| ConfigSocketServer & | setReusePort (bool reusePort=true) |
| bool | getReusePort () const |
| ConfigSocketServer & | setDisableNagleAlgorithm (bool disableNagleAlgorithm=true) |
| bool | getDisableNagleAlgorithm () const |
| Public Member Functions inherited from net::in::config::ConfigAddress< net::config::ConfigAddressLocal > | |
| SocketAddress | getSocketAddress (const SocketAddress::SockAddr &sockAddr, SocketAddress::SockLen sockAddrLen) |
| ConfigAddress & | setSocketAddress (const SocketAddress &socketAddress) |
| ConfigAddress & | setHost (const std::string &ipOrHostname) |
| std::string | getHost () const |
| ConfigAddress & | setPort (uint16_t port) |
| uint16_t | getPort () const |
| ConfigAddress & | setNumeric (bool numeric=true) |
| bool | getNumeric () const |
| ConfigAddress & | setNumericReverse (bool numeric=true) |
| bool | getNumericReverse () const |
| void | configurable (bool configurable=true) final |
| Public Member Functions inherited from net::config::ConfigSection | |
| template<typename T> | |
| ConfigSection (ConfigInstance *instance, T *sectionPtr, const std::string &group="Sections") | |
| ~ConfigSection () override | |
| ConfigSection (const ConfigSection &)=delete | |
| ConfigSection (ConfigSection &&)=delete | |
| ConfigSection & | operator= (const ConfigSection &)=delete |
| Public Member Functions inherited from utils::SubCommand | |
| SubCommand (const SubCommand &)=delete | |
| SubCommand (SubCommand &&)=delete | |
| SubCommand & | operator= (const SubCommand &)=delete |
| SubCommand & | operator= (SubCommand &&)=delete |
| virtual | ~SubCommand () |
| std::string | getName () const |
| std::string | version () const |
| void | parse (int argc, char *argv[]) |
| CLI::Option * | setConfig (const std::string &defaultConfigFile) const |
| CLI::Option * | setLogFile (const std::string &defaultLogFile) const |
| CLI::Option * | setVersionFlag (const std::string &version) const |
| bool | hasParent () const |
| SubCommand * | getParent () |
| SubCommand * | allowExtras (bool allow=true) |
| SubCommand * | required (bool required=true, bool force=true) |
| SubCommand * | required (SubCommand *subCommand, bool required=true) |
| SubCommand * | required (CLI::Option *option, bool required=true) |
| SubCommand * | needs (SubCommand *subCommand, bool needs=true) |
| SubCommand * | disabled (SubCommand *subCommand, bool disabled=true) |
| SubCommand * | setRequireCallback (const std::function< void(void)> &callback) |
| SubCommand * | finalCallback (const std::function< void()> &finalCallback) |
| std::string | configToStr () const |
| std::string | help (const CLI::App *helpApp, const CLI::AppFormatMode &mode) const |
| template<typename NewSubCommand, typename... Args> | |
| NewSubCommand * | newSubCommand (Args &&... args) |
| template<typename RequestedSubCommand> | |
| RequestedSubCommand * | getSubCommand () |
| template<typename RequestedSubCommand> | |
| RequestedSubCommand * | getSubCommand () const |
| CLI::Option * | getOption (const std::string &name) const |
| CLI::Option * | addOption (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOption (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOptionVariable (const std::string &name, ValueTypeT &variable, const std::string &description, const std::string &typeName, const CLI::Validator &additionalValidator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOptionVariable (const std::string &name, ValueTypeT &variable, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &additionalValidator) const |
| CLI::Option * | addOptionFunction (const std::string &name, std::function< void(const std::string &)> &callback, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addOptionFunction (const std::string &name, std::function< void(const std::string &)> &callback, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const |
| CLI::Option * | addFlag (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const |
| template<typename ValueTypeT> | |
| CLI::Option * | addFlag (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const |
| CLI::Option * | addFlagFunction (const std::string &name, const std::function< void()> &callback, const std::string &description, const std::string &typeName, const CLI::Validator &validator) |
| 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) |
| Public Member Functions inherited from net::config::ConfigAddress< net::in::SocketAddress > | |
| net::in::SocketAddress | getSocketAddress (const typename net::in::SocketAddress::SockAddr &sockAddr, typename net::in::SocketAddress::SockLen sockAddrLen) |
| void | renew () |
| Public Member Functions inherited from net::config::ConfigAddressBase< net::in::SocketAddress > | |
| net::in::SocketAddress | getSocketAddress (const typename net::in::SocketAddress::SockAddr &sockAddr, typename net::in::SocketAddress::SockLen sockAddrLen) |
| Public Member Functions inherited from net::in::config::ConfigAddressReverse< net::config::ConfigAddressReverse > | |
| SocketAddress | getSocketAddress (const SocketAddress::SockAddr &sockAddr, SocketAddress::SockLen sockAddrLen) |
| ConfigAddressReverse & | setNumericReverse (bool numeric=true) |
| bool | getNumericReverse () const |
| Public Member Functions inherited from net::config::ConfigConnection | |
| utils::Timeval | getReadTimeout () const |
| ConfigConnection & | setReadTimeout (const utils::Timeval &newReadTimeoutSet) |
| utils::Timeval | getWriteTimeout () const |
| ConfigConnection & | setWriteTimeout (const utils::Timeval &newWriteTimeoutSet) |
| std::size_t | getReadBlockSize () const |
| ConfigConnection & | setReadBlockSize (std::size_t newReadBlockSize) |
| std::size_t | getWriteBlockSize () const |
| ConfigConnection & | setWriteBlockSize (std::size_t newWriteBlockSize) |
| utils::Timeval | getTerminateTimeout () const |
| ConfigConnection & | setTerminateTimeout (const utils::Timeval &newTerminateTimeout) |
| Public Member Functions inherited from net::config::ConfigPhysicalSocketServer | |
| ConfigPhysicalSocketServer & | setBacklog (int newBacklog) |
| int | getBacklog () const |
| ConfigPhysicalSocketServer & | setAcceptsPerTick (int acceptsPerTickSet) |
| int | getAcceptsPerTick () const |
| ConfigPhysicalSocketServer & | setAcceptTimeout (const utils::Timeval &acceptTimeout) |
| utils::Timeval | getAcceptTimeout () const |
| Public Member Functions inherited from net::config::ConfigPhysicalSocket | |
| const std::map< int, std::map< int, net::phy::PhysicalSocketOption > > & | getSocketOptions () const |
| ConfigPhysicalSocket & | addSocketOption (int optLevel, int optName, int optValue) |
| ConfigPhysicalSocket & | addSocketOption (int optLevel, int optName, const std::string &optValue) |
| ConfigPhysicalSocket & | addSocketOption (int optLevel, int optName, const std::vector< char > &optValue) |
| ConfigPhysicalSocket & | removeSocketOption (int optLevel, int optName) |
| ConfigPhysicalSocket & | setRetry (bool retry=true) |
| bool | getRetry () const |
| ConfigPhysicalSocket & | setRetryOnFatal (bool retry=true) |
| bool | getRetryOnFatal () const |
| ConfigPhysicalSocket & | setRetryTimeout (double sec) |
| double | getRetryTimeout () const |
| ConfigPhysicalSocket & | setRetryTries (unsigned int tries=0) |
| unsigned int | getRetryTries () const |
| ConfigPhysicalSocket & | setRetryBase (double base) |
| double | getRetryBase () const |
| ConfigPhysicalSocket & | setRetryLimit (unsigned int limit) |
| unsigned int | getRetryLimit () const |
| ConfigPhysicalSocket & | setRetryJitter (double percent) |
| double | getRetryJitter () const |
| template<typename ConcretConfigPhysicalSocket> | |
| ConfigPhysicalSocket (ConfigInstance *instance, ConcretConfigPhysicalSocket *section) | |
Protected Member Functions | |
| ConfigSocketServer (net::config::ConfigInstance *instance) | |
| ~ConfigSocketServer () override | |
| Protected Member Functions inherited from net::config::stream::ConfigSocketServer< net::in::config::ConfigAddress, net::in::config::ConfigAddressReverse > | |
| ConfigSocketServer (net::config::ConfigInstance *instance) | |
| Protected Member Functions inherited from net::in::config::ConfigAddress< net::config::ConfigAddressLocal > | |
| ConfigAddress (net::config::ConfigInstance *instance, const std::string &addressOptionName, const std::string &addressOptionDescription) | |
| ConfigAddress & | setAiFlags (int aiFlags) |
| int | getAiFlags () const |
| ConfigAddress & | setAiSockType (int aiSockType) |
| int | getAiSockType () const |
| ConfigAddress & | setAiProtocol (int aiProtocol) |
| int | getAiProtocol () const |
| ConfigAddress & | setHostRequired (bool required=true) |
| ConfigAddress & | setPortRequired (bool required=true) |
| Protected Member Functions inherited from utils::SubCommand | |
| SubCommand (SubCommand *parent, std::shared_ptr< utils::AppWithPtr > appWithPtr, const std::string &group, bool final) | |
| template<typename ConcretSubCommand> | |
| SubCommand (SubCommand *parent, ConcretSubCommand *concretSubCommand, const std::string &group, bool final=true) | |
| SubCommand * | description (const std::string &description) |
| SubCommand * | footer (const std::string &footer) |
| template<typename ValueTypeT> | |
| CLI::Option * | setDefaultValue (CLI::Option *option, const ValueTypeT &value, bool clear=true) const |
| CLI::Option * | setConfigurable (CLI::Option *option, bool configurable) const |
| Protected Member Functions inherited from net::config::ConfigAddress< net::in::SocketAddress > | |
| ConfigAddress (ConfigInstance *instance, const std::string &addressOptionName, const std::string &addressOptionDescription) | |
| ~ConfigAddress () override | |
| Protected Member Functions inherited from net::config::ConfigAddressBase< net::in::SocketAddress > | |
| ConfigAddressBase (ConfigInstance *instance, const std::string &addressOptionName="", const std::string &addressOptionDescription="") | |
| virtual | ~ConfigAddressBase ()=default |
| Protected Member Functions inherited from net::in::config::ConfigAddressReverse< net::config::ConfigAddressReverse > | |
| ConfigAddressReverse (net::config::ConfigInstance *instance, const std::string &addressOptionName, const std::string &addressOptionDescription) | |
| Protected Member Functions inherited from net::config::ConfigConnection | |
| ConfigConnection (ConfigInstance *instance) | |
| ~ConfigConnection () override | |
| Protected Member Functions inherited from net::config::ConfigPhysicalSocketServer | |
| ConfigPhysicalSocketServer (ConfigInstance *instance) | |
| ~ConfigPhysicalSocketServer () override | |
| Protected Member Functions inherited from net::config::ConfigPhysicalSocket | |
| template<typename ConcretConfigPhysicalSocketT> | |
| ConfigPhysicalSocket (ConfigInstance *instance, ConcretConfigPhysicalSocketT *section) | |
| ~ConfigPhysicalSocket () override | |
| 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) |
Private Attributes | |
| CLI::Option * | reuseAddressOpt = nullptr |
| CLI::Option * | reusePortOpt = nullptr |
| CLI::Option * | disableNagleAlgorithmOpt = nullptr |
Additional Inherited Members | |
| Public Types inherited from net::config::stream::ConfigSocketServer< net::in::config::ConfigAddress, net::in::config::ConfigAddressReverse > | |
| using | Local |
| using | Remote |
| using | Connection |
| using | Socket |
| Static Public Member Functions inherited from utils::SubCommand | |
| static CLI::App * | getHelpTriggerApp () |
| static CLI::App * | getShowConfigTriggerApp () |
| static CLI::App * | getCommandlineTriggerApp () |
| Static Public Attributes inherited from utils::SubCommand | |
| static std::shared_ptr< CLI::Formatter > | sectionFormatter = makeSectionFormatter() |
| Static Public Attributes inherited from net::config::ConfigAddressLocal< net::in::SocketAddress > | |
| static constexpr std::string_view | NAME |
| static constexpr std::string_view | DESCRIPTION |
| Static Public Attributes inherited from net::config::ConfigAddressReverse< net::in::SocketAddress > | |
| static constexpr std::string_view | NAME |
| static constexpr std::string_view | DESCRIPTION |
| Static Public Attributes inherited from net::config::ConfigConnection | |
| static constexpr std::string_view | NAME {"connection"} |
| static constexpr std::string_view | DESCRIPTION {"Configuration of established connections"} |
| Static Public Attributes inherited from net::config::ConfigPhysicalSocket | |
| static constexpr std::string_view | NAME {"socket"} |
| static constexpr std::string_view | DESCRIPTION {"Configuration of socket behavior"} |
| Static Protected Attributes inherited from utils::SubCommand | |
| static std::map< std::string, std::string > | aliases |
| static CLI::App * | helpTriggerApp = nullptr |
| static CLI::App * | showConfigTriggerApp = nullptr |
| static CLI::App * | commandlineTriggerApp = nullptr |
Definition at line 58 of file ConfigSocketServer.h.
|
explicitprotected |
Definition at line 60 of file ConfigSocketServer.cpp.
References net::config::ConfigPhysicalSocket::addSocketOption(), net::config::stream::ConfigSocketServer< ConfigAddressLocalT, ConfigAddressRemoteT >::ConfigSocketServer(), disableNagleAlgorithmOpt, reuseAddressOpt, reusePortOpt, net::in::config::ConfigAddress< ConfigAddressTypeT >::setAiFlags(), net::in::config::ConfigAddress< ConfigAddressTypeT >::setAiProtocol(), net::in::config::ConfigAddress< ConfigAddressTypeT >::setAiSockType(), utils::SubCommand::setDefaultValue(), and net::in::config::ConfigAddress< ConfigAddressTypeT >::setPortRequired().
|
overrideprotected |
Definition at line 98 of file ConfigSocketServer.cpp.
| bool net::in::stream::config::ConfigSocketServer::getDisableNagleAlgorithm | ( | ) | const |
Definition at line 145 of file ConfigSocketServer.cpp.
References disableNagleAlgorithmOpt.
| bool net::in::stream::config::ConfigSocketServer::getReuseAddress | ( | ) | const |
Definition at line 113 of file ConfigSocketServer.cpp.
References reuseAddressOpt.
| bool net::in::stream::config::ConfigSocketServer::getReusePort | ( | ) | const |
Definition at line 129 of file ConfigSocketServer.cpp.
References reusePortOpt.
| ConfigSocketServer & net::in::stream::config::ConfigSocketServer::setDisableNagleAlgorithm | ( | bool | disableNagleAlgorithm = true | ) |
Definition at line 133 of file ConfigSocketServer.cpp.
References net::config::ConfigPhysicalSocket::addSocketOption(), disableNagleAlgorithmOpt, and utils::SubCommand::setDefaultValue().
| ConfigSocketServer & net::in::stream::config::ConfigSocketServer::setReuseAddress | ( | bool | reuseAddress = true | ) |
Definition at line 101 of file ConfigSocketServer.cpp.
References net::config::ConfigPhysicalSocket::addSocketOption(), reuseAddressOpt, and utils::SubCommand::setDefaultValue().
Referenced by main().
| ConfigSocketServer & net::in::stream::config::ConfigSocketServer::setReusePort | ( | bool | reusePort = true | ) |
Definition at line 117 of file ConfigSocketServer.cpp.
References net::config::ConfigPhysicalSocket::addSocketOption(), reusePortOpt, and utils::SubCommand::setDefaultValue().
|
private |
Definition at line 78 of file ConfigSocketServer.h.
Referenced by ConfigSocketServer(), getDisableNagleAlgorithm(), and setDisableNagleAlgorithm().
|
private |
Definition at line 76 of file ConfigSocketServer.h.
Referenced by ConfigSocketServer(), getReuseAddress(), and setReuseAddress().
|
private |
Definition at line 77 of file ConfigSocketServer.h.
Referenced by ConfigSocketServer(), getReusePort(), and setReusePort().