46 typedef std::vector<Address> AddressList ;
47 G_EXCEPTION( Error ,
"asynchronous resolver error" ) ;
48 G_EXCEPTION( BusyError ,
"asynchronous resolver still busy" ) ;
74 static AddressList
resolve(
const std::string & host ,
const std::string & service ,
int family = AF_UNSPEC ,
bool dgram =
false ) ;
90 void done(
const std::string & ,
const Location & ) ;
95 unique_ptr<ResolverImp> m_imp ;
void start(const Location &)
Starts asynchronous name-to-address resolution.
An abstract interface for handling exceptions thrown out of event-loop callbacks (socket events and t...
A class for synchronous or asynchronous network name to address resolution.
An interface used for GNet::Resolver callbacks.
A class that holds a host/service name pair and the preferred address family (if any), and also the results of a name-to-address lookup, ie.
Resolver(Callback &)
Constructor taking a callback interface reference.
virtual void onResolved(std::string error, Location)=0
Called on completion of GNet::Resolver name resolution.
static bool async()
Returns true if the resolver supports asynchronous operation.
bool busy() const
Returns true if there is a pending resolve request.
static std::string resolve(Location &)
Does syncronous name resolution.
A private "pimple" implementation class used by GNet::Resolver to do asynchronous name resolution...