The getaddrinfo request.
More...
#include <dns.h>
|
int | node_addr_info (const std::string &node, addrinfo *hints=nullptr) |
| Async getaddrinfo.
|
|
std::pair< bool, std::unique_ptr< addrinfo, deleter > > | node_addr_info_sync (const std::string &node, addrinfo *hints=nullptr) |
| Sync getaddrinfo.
|
|
int | service_addr_info (const std::string &service, addrinfo *hints=nullptr) |
| Async getaddrinfo.
|
|
std::pair< bool, std::unique_ptr< addrinfo, deleter > > | service_addr_info_sync (const std::string &service, addrinfo *hints=nullptr) |
| Sync getaddrinfo.
|
|
int | addr_info (const std::string &node, const std::string &service, addrinfo *hints=nullptr) |
| Async getaddrinfo.
|
|
std::pair< bool, std::unique_ptr< addrinfo, deleter > > | addr_info_sync (const std::string &node, const std::string &service, addrinfo *hints=nullptr) |
| Sync getaddrinfo.
|
|
int | cancel () |
| Cancels a pending request.
|
|
std::size_t | size () const noexcept |
| Returns the size of the underlying request type.
|
|
template<typename R = void> |
std::shared_ptr< R > | data () const |
| Gets user-defined data. uvw won't use this field in any case.
|
|
void | data (std::shared_ptr< void > udata) |
| Sets arbitrary data. uvw won't use this field in any case.
|
|
virtual int | init () |
| Initializes the handle.
|
|
loop & | parent () const noexcept |
| Gets the loop from which the resource was originated.
|
|
const U * | raw () const noexcept |
| Gets the underlying raw data structure.
|
|
U * | raw () noexcept |
| Gets the underlying raw data structure.
|
|
void | on (listener_t< U > f) |
| Registers a long-lived listener with the event emitter.
|
|
void | reset () noexcept |
| Disconnects the listener for the given event type.
|
|
void | reset () noexcept |
| Disconnects all listeners.
|
|
bool | has () const noexcept |
| Checks if there is a listener registered for the specific event.
|
|
The getaddrinfo request.
Wrapper for getaddrinfo.
It offers either asynchronous and synchronous access methods.
To create a get_addr_info_req
through a loop
, no arguments are required.
Definition at line 58 of file dns.h.
◆ addr_info()
int uvw::get_addr_info_req::addr_info |
( |
const std::string & |
node, |
|
|
const std::string & |
service, |
|
|
addrinfo * |
hints = nullptr |
|
) |
| |
Async getaddrinfo.
- Parameters
-
node | Either a numerical network address or a network hostname. |
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
- Returns
- Underlying return value.
◆ addr_info_sync()
std::pair< bool, std::unique_ptr< addrinfo, deleter > > uvw::get_addr_info_req::addr_info_sync |
( |
const std::string & |
node, |
|
|
const std::string & |
service, |
|
|
addrinfo * |
hints = nullptr |
|
) |
| |
Sync getaddrinfo.
- Parameters
-
node | Either a numerical network address or a network hostname. |
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
- Returns
- A
std::pair
composed as it follows:
- A boolean value that is true in case of success, false otherwise.
- A
std::unique_ptr<addrinfo, deleter>
containing the data requested.
◆ node_addr_info()
int uvw::get_addr_info_req::node_addr_info |
( |
const std::string & |
node, |
|
|
addrinfo * |
hints = nullptr |
|
) |
| |
Async getaddrinfo.
- Parameters
-
node | Either a numerical network address or a network hostname. |
hints | Optional addrinfo data structure with additional address type constraints. |
- Returns
- Underlying return value.
◆ node_addr_info_sync()
std::pair< bool, std::unique_ptr< addrinfo, deleter > > uvw::get_addr_info_req::node_addr_info_sync |
( |
const std::string & |
node, |
|
|
addrinfo * |
hints = nullptr |
|
) |
| |
Sync getaddrinfo.
- Parameters
-
node | Either a numerical network address or a network hostname. |
hints | Optional addrinfo data structure with additional address type constraints. |
- Returns
- A
std::pair
composed as it follows:
- A boolean value that is true in case of success, false otherwise.
- A
std::unique_ptr<addrinfo, deleter>
containing the data requested.
◆ service_addr_info()
int uvw::get_addr_info_req::service_addr_info |
( |
const std::string & |
service, |
|
|
addrinfo * |
hints = nullptr |
|
) |
| |
Async getaddrinfo.
- Parameters
-
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
- Returns
- Underlying return value.
◆ service_addr_info_sync()
std::pair< bool, std::unique_ptr< addrinfo, deleter > > uvw::get_addr_info_req::service_addr_info_sync |
( |
const std::string & |
service, |
|
|
addrinfo * |
hints = nullptr |
|
) |
| |
Sync getaddrinfo.
- Parameters
-
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
- Returns
- A
std::pair
composed as it follows:
- A boolean value that is true in case of success, false otherwise.
- A
std::unique_ptr<addrinfo, deleter>
containing the data requested.
The documentation for this class was generated from the following file: