|
Async
1.5.0
|
A class for performing asynchronous DNS lookups. More...
#include <AsyncDnsLookup.h>
Public Member Functions | |
| DnsLookup (const std::string &label) | |
| Constructor. More... | |
| ~DnsLookup (void) | |
| Destructor. More... | |
| const std::string & | label (void) const |
| Return the associated label. More... | |
| bool | resultsAreReady (void) |
| Check if the DNS lookup is done or not. More... | |
| std::vector< IpAddress > | addresses (void) |
| Return the addresses for the host in the query. More... | |
Public Attributes | |
| sigc::signal< void, DnsLookup & > | resultsReady |
| A signal to indicate that the query has been completed. More... | |
A class for performing asynchronous DNS lookups.
Use this class to make DNS lookups. Right now it only supports looking up hostnames to find out what IP-addresses it maps to. An example usage can be seen below.
Definition at line 120 of file AsyncDnsLookup.h.
| Async::DnsLookup::DnsLookup | ( | const std::string & | label | ) |
Constructor.
| label | The label (hostname) to lookup |
| Async::DnsLookup::~DnsLookup | ( | void | ) |
Destructor.
| std::vector<IpAddress> Async::DnsLookup::addresses | ( | void | ) |
Return the addresses for the host in the query.
Use this function to retrieve all the IP-addresses associated with the hostname in the query. If the list is empty, the query has failed.
|
inline |
Return the associated label.
Definition at line 138 of file AsyncDnsLookup.h.
|
inline |
Check if the DNS lookup is done or not.
Definition at line 144 of file AsyncDnsLookup.h.
| sigc::signal<void, DnsLookup&> Async::DnsLookup::resultsReady |
A signal to indicate that the query has been completed.
| dns | A reference to the DNS object associated with the query |
Definition at line 162 of file AsyncDnsLookup.h.