12 #ifndef TCPIP_CONFIG_H
13 #define TCPIP_CONFIG_H
17 #include <tr1/cstdint>
36 typedef std::tr1::uint16_t
Port;
170 #endif // #ifndef TCPIP_CONFIG_H
bool operator!=(const TCPIPConfig &other) const
Non-equality comparison.
std::map< std::string, std::string > RawConfigValues
Raw configuration option -> values mapping.
Definition: config.h:40
bool operator==(const TCPIPConfig &other) const
Equality comparison.
static Interfaces parseInterfaces(const std::string &rawInterfaces)
static const Port DEFAULT_PORT
Default port number.
Definition: tcpip_config.h:165
static const Timeout DEFAULT_TIMEOUT
Default connection timeout (in seconds).
Definition: tcpip_config.h:167
Timeout _timeout
Connection timeout (in seconds).
Definition: tcpip_config.h:162
Config class - declarations.
BaseException class - declarations.
Base class for all configuration classes.
Definition: config.h:28
std::tr1::uint16_t Port
Port number type.
Definition: tcpip_config.h:36
Interfaces _interfaces
Interfaces on which the TCP/IP server should listen.
Definition: tcpip_config.h:158
std::vector< std::string > Interfaces
List of network iterfaces.
Definition: tcpip_config.h:33
time_t Timeout
Timeout type.
Definition: tcpip_config.h:39
Port _port
Port number on which the TCP/IP server should listen.
Definition: tcpip_config.h:160
Interfaces getInterfaces() const
Returns the list of interfaces on which the TCP/IP server should listen.
Definition: tcpip_config.h:119
Port getPort() const
Returns the port number on which the TCP/IP server should listen.
Definition: tcpip_config.h:122
TCPIPConfig & operator=(const TCPIPConfig &other)
Assignment operator.
Configuration for a TCP/IP server.
Definition: tcpip_config.h:30
void swap(TCPIPConfig &other)
Swap the contents of this object with the other object.
static Port parsePort(const std::string &rawPort)
time_t getTimeout() const
Returns the connection timout (in seconds).
Definition: tcpip_config.h:125
static Timeout parseTimeout(const std::string &rawTimeout)
~TCPIPConfig()
Destructor.
TCPIPConfig()
Default constructor.
static const std::string ANY_INTERFACE
Definition: tcpip_config.h:130
static TCPIPConfig fromRawConfigValues(RawConfigValues rawConfigValues)
Creates a TCPIPConfig object from raw configuration values.