57 static bool parse(
const std::string & in , std::string & host_or_address , std::string & service_or_port ) ;
65 bool resolveReq( std::string name ,
bool udp =
false ) ;
73 bool resolveReq( std::string host_name, std::string service_name ,
bool udp =
false ) ;
80 std::string fqdn_or_failure_reason ) ;
101 void operator=(
const Resolver & ) ;
103 static unsigned int resolveService(
const std::string & ,
bool , std::string & ) ;
104 static std::string resolveHost(
const std::string & host_name ,
unsigned int ,
ResolverInfo & ) ;
virtual ~Resolver()
Virtual destructor.
A class for asynchronous TCP name-to-address resolution.
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...
static std::string resolve(ResolverInfo &host_and_service, bool udp=false)
Does syncronous name resolution.
virtual void resolveCon(bool success, const Address &address, std::string fqdn_or_failure_reason)
Called when the resolution process is complete.
static bool parse(const std::string &in, std::string &host_or_address, std::string &service_or_port)
Parses a string that contains a hostname or ip address plus a server name or port number...
A base class for classes that handle asynchronous socket events.
bool busy() const
Returns true if there is a pending resolve request.
bool resolveReq(std::string name, bool udp=false)
Initiates a name-to-address resolution.
Resolver(EventHandler &)
Constructor taking an event handler reference.
A pimple-pattern implementation class for GNet::Resolver.