VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GNet::ResolverFuture Class Reference

Address a = f.get().first ;. More...

Public Types

typedef std::pair< Address,
std::string > 
Pair
 
typedef std::vector< AddressList
 

Public Member Functions

 ResolverFuture (const std::string &host, const std::string &service, int family, bool dgram, bool for_async_hint=false)
 
void run ()
 
Pair get ()
 
void get (List &)
 
bool error () const
 
std::string reason () const
 

Detailed Description

Address a = f.get().first ;.

A 'future' object for asynchronous name resolution, in practice holding just enough state for a single call to getaddrinfo().

The run() method can be called from a worker thread and the results collected by the main thread with get() once the run() has finished.

Signalling completion from worker thread to main thread is out of scope for this class; see GNet::FutureEvent.

Eg:

Definition at line 73 of file gresolver.cpp.


The documentation for this class was generated from the following file: