12 #ifndef INET_ADDRESS_H 13 #define INET_ADDRESS_H 63 INETAddress (
const char* host_,
const char* service_,
static string m_fqdn_cache
Cached fully-qualified domain name.
~INETAddress()
Destructor.
int getPort() const
Return port.
const int getLength() const
Return address length.
SA_IN m_address
Internet address structure sockaddr_in.
void init()
Perform initialization common to all ctors.
void createHostPort(const char *host_, int port_)
Makes socket address out of host name and port.
string getHostName()
Return host name.
Address is an abstraction for INET or UNIX-domain address data type.
INETAddress()
Default constructor.
int getServiceByName(string serv_, Protocol prot_=TCP)
Lookup port by its service name found in /etc/services.
void dump()
Dump the address content to log file.
SA * getAddress() const
Get hold of address structure.
static string get_fully_qualified_domain_name(vector< string > &aliases_)
Return fully-qualified host name.