uvw 2.12.1
|
The GetNameInfoReq request. More...
#include <dns.h>
Public Member Functions | |
void | nameInfo (const sockaddr &addr, int flags=0) |
Async getnameinfo. | |
template<typename I = IPv4> | |
void | nameInfo (const std::string &ip, unsigned int port, int flags=0) |
Async getnameinfo. | |
template<typename I = IPv4> | |
void | nameInfo (Addr addr, int flags=0) |
Async getnameinfo. | |
std::pair< bool, std::pair< const char *, const char * > > | nameInfoSync (const sockaddr &addr, int flags=0) |
Sync getnameinfo. | |
template<typename I = IPv4> | |
std::pair< bool, std::pair< const char *, const char * > > | nameInfoSync (const std::string &ip, unsigned int port, int flags=0) |
Sync getnameinfo. | |
template<typename I = IPv4> | |
std::pair< bool, std::pair< const char *, const char * > > | nameInfoSync (Addr addr, int flags=0) |
Sync getnameinfo. | |
![]() | |
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_getnameinfo_t * | raw () const noexcept |
Gets the underlying raw data structure. | |
uv_getnameinfo_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. | |
Additional Inherited Members | |
![]() | |
![]() | |
static std::shared_ptr< GetNameInfoReq > | create (Args &&...args) |
Creates a new resource of the given type. | |
![]() | |
![]() | |
![]() | |
![]() | |
![]() | |
![]() |
The GetNameInfoReq request.
Wrapper for getnameinfo.
It offers either asynchronous and synchronous access methods.
To create a GetNameInfoReq
through a Loop
, no arguments are required.
void uvw::GetNameInfoReq::nameInfo | ( | Addr | addr, |
int | flags = 0 ) |
Async getnameinfo.
addr | A valid instance of Addr. |
flags | Optional flags that modify the behavior of getnameinfo . |
void uvw::GetNameInfoReq::nameInfo | ( | const sockaddr & | addr, |
int | flags = 0 ) |
Async getnameinfo.
addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
flags | Optional flags that modify the behavior of getnameinfo . |
void uvw::GetNameInfoReq::nameInfo | ( | const std::string & | ip, |
unsigned int | port, | ||
int | flags = 0 ) |
Async getnameinfo.
ip | A valid IP address. |
port | A valid port number. |
flags | Optional flags that modify the behavior of getnameinfo . |
std::pair< bool, std::pair< const char *, const char * > > uvw::GetNameInfoReq::nameInfoSync | ( | Addr | addr, |
int | flags = 0 ) |
Sync getnameinfo.
addr | A valid instance of Addr. |
flags | Optional flags that modify the behavior of getnameinfo . |
std::pair
composed as it follows:std::pair
composed as it follows:const char *
containing a valid hostname.const char *
containing a valid service name. std::pair< bool, std::pair< const char *, const char * > > uvw::GetNameInfoReq::nameInfoSync | ( | const sockaddr & | addr, |
int | flags = 0 ) |
Sync getnameinfo.
addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
flags | Optional flags that modify the behavior of getnameinfo . |
std::pair
composed as it follows:std::pair
composed as it follows:const char *
containing a valid hostname.const char *
containing a valid service name. std::pair< bool, std::pair< const char *, const char * > > uvw::GetNameInfoReq::nameInfoSync | ( | const std::string & | ip, |
unsigned int | port, | ||
int | flags = 0 ) |
Sync getnameinfo.
ip | A valid IP address. |
port | A valid port number. |
flags | Optional flags that modify the behavior of getnameinfo . |
std::pair
composed as it follows:std::pair
composed as it follows:const char *
containing a valid hostname.const char *
containing a valid service name.