21 #ifndef G_RESOLVER_INFO_H
22 #define G_RESOLVER_INFO_H
51 G_EXCEPTION( InvalidFormat ,
"invalid host:service format" ) ;
59 std::string
host()
const ;
75 std::string
name()
const ;
79 std::string
str()
const ;
100 static std::string part(
const std::string & ,
bool ) ;
101 static bool socked(
const std::string & , std::string & ,
unsigned int & ) ;
102 static std::string sockless(
const std::string & ) ;
106 std::string m_service ;
107 bool m_address_valid ;
109 std::string m_canonical_name ;
112 std::string m_socks_far_host ;
113 unsigned int m_socks_far_port ;
void update(const Address &address, const std::string &canonical_name)
Updates the address and canonical name, typically after doing a name lookup on host() and service()...
std::string socksFarHost() const
Returns the port for the socks far server.
The Address class encapsulates an IP transport address.
A class that holds a host/service name pair and optionally the results of a name-to-address lookup...
ResolverInfo(const std::string &host, const std::string &service)
Constructor.
unsigned int socksFarPort() const
Returns the port number for the socks far server.
Address address() const
Returns the remote address.
bool hasAddress() const
Returns true after update() has been called.
bool socks() const
Returns true if using socks.
std::string str() const
Returns a string representation of the host and service names that can be passed to the Resolver's re...
#define G_EXCEPTION(class_name, description)
define as a function rather than a type if optimising for size
std::string displayString(bool simple=false) const
Returns a string representation for logging and debug.
std::string service() const
Returns the remote service name, as passed in to the constructor.
G::DateTime::EpochTime updateTime() const
Returns the time of the last update().
std::string name() const
Returns the remote canonical name.
std::string host() const
Returns the remote host name, as passed in to the constructor.