The GetAddrInfoReq request.
More...
#include <dns.h>
|
| void | nodeAddrInfo (const std::string &node, addrinfo *hints=nullptr) |
| | Async getaddrinfo.
|
| |
| std::pair< bool, std::unique_ptr< addrinfo, Deleter > > | nodeAddrInfoSync (const std::string &node, addrinfo *hints=nullptr) |
| | Sync getaddrinfo.
|
| |
| void | serviceAddrInfo (const std::string &service, addrinfo *hints=nullptr) |
| | Async getaddrinfo.
|
| |
| std::pair< bool, std::unique_ptr< addrinfo, Deleter > > | serviceAddrInfoSync (const std::string &service, addrinfo *hints=nullptr) |
| | Sync getaddrinfo.
|
| |
| void | addrInfo (const std::string &node, const std::string &service, addrinfo *hints=nullptr) |
| | Async getaddrinfo.
|
| |
| std::pair< bool, std::unique_ptr< addrinfo, Deleter > > | addrInfoSync (const std::string &node, const std::string &service, addrinfo *hints=nullptr) |
| | Sync getaddrinfo.
|
| |
| bool | cancel () |
| | Cancels a pending request.
|
| |
| std::size_t | size () const noexcept |
| | Returns the size of the underlying request type.
|
| |
| 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.
|
| |
| Loop & | loop () const noexcept |
| | Gets the loop from which the resource was originated.
|
| |
| const uv_getaddrinfo_t * | raw () const noexcept |
| | Gets the underlying raw data structure.
|
| |
| uv_getaddrinfo_t * | raw () noexcept |
| | Gets the underlying raw data structure.
|
| |
| Connection< E > | on (Listener< E > f) |
| | Registers a long-lived listener with the event emitter.
|
| |
| Connection< E > | once (Listener< E > f) |
| | Registers a short-lived listener with the event emitter.
|
| |
| void | erase (Connection< E > conn) noexcept |
| | Disconnects a listener from the event emitter.
|
| |
|
void | clear () noexcept |
| | Disconnects all the listeners for the given event type.
|
| |
|
void | clear () noexcept |
| | Disconnects all the listeners.
|
| |
| bool | empty () const noexcept |
| | Checks if there are listeners registered for the specific event.
|
| |
| bool | empty () const noexcept |
| | Checks if there are listeners registered with the event emitter.
|
| |
|
| static std::shared_ptr< GetAddrInfoReq > | create (Args &&...args) |
| | Creates a new resource of the given type.
|
| |
The GetAddrInfoReq request.
Wrapper for getaddrinfo.
It offers either asynchronous and synchronous access methods.
To create a GetAddrInfoReq through a Loop, no arguments are required.
Definition at line 66 of file dns.h.
◆ addrInfo()
| void uvw::GetAddrInfoReq::addrInfo |
( |
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. |
◆ addrInfoSync()
| std::pair< bool, std::unique_ptr< addrinfo, Deleter > > uvw::GetAddrInfoReq::addrInfoSync |
( |
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.
◆ nodeAddrInfo()
| void uvw::GetAddrInfoReq::nodeAddrInfo |
( |
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. |
◆ nodeAddrInfoSync()
| std::pair< bool, std::unique_ptr< addrinfo, Deleter > > uvw::GetAddrInfoReq::nodeAddrInfoSync |
( |
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.
◆ serviceAddrInfo()
| void uvw::GetAddrInfoReq::serviceAddrInfo |
( |
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. |
◆ serviceAddrInfoSync()
| std::pair< bool, std::unique_ptr< addrinfo, Deleter > > uvw::GetAddrInfoReq::serviceAddrInfoSync |
( |
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: