The getnameinfo request.
More...
#include <dns.h>
|
| int | name_info (const sockaddr &addr, int flags=0) |
| | Async getnameinfo.
|
| |
| int | name_info (const std::string &ip, unsigned int port, int flags=0) |
| | Async getnameinfo.
|
| |
| int | name_info (socket_address addr, int flags=0) |
| | Async getnameinfo.
|
| |
| std::pair< bool, std::pair< const char *, const char * > > | name_info_sync (const sockaddr &addr, int flags=0) |
| | Sync getnameinfo.
|
| |
| std::pair< bool, std::pair< const char *, const char * > > | name_info_sync (const std::string &ip, unsigned int port, int flags=0) |
| | Sync getnameinfo.
|
| |
| std::pair< bool, std::pair< const char *, const char * > > | name_info_sync (socket_address addr, int flags=0) |
| | Sync getnameinfo.
|
| |
| 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 getnameinfo request.
Wrapper for getnameinfo.
It offers either asynchronous and synchronous access methods.
To create a get_name_info_req through a loop, no arguments are required.
Definition at line 145 of file dns.h.
◆ name_info() [1/3]
| int uvw::get_name_info_req::name_info |
( |
const sockaddr & |
addr, |
|
|
int |
flags = 0 |
|
) |
| |
Async getnameinfo.
- Parameters
-
| addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
| flags | Optional flags that modify the behavior of getnameinfo. |
- Returns
- Underlying return value.
◆ name_info() [2/3]
| int uvw::get_name_info_req::name_info |
( |
const std::string & |
ip, |
|
|
unsigned int |
port, |
|
|
int |
flags = 0 |
|
) |
| |
Async getnameinfo.
- Parameters
-
| ip | A valid IP address. |
| port | A valid port number. |
| flags | Optional flags that modify the behavior of getnameinfo. |
- Returns
- Underlying return value.
◆ name_info() [3/3]
| int uvw::get_name_info_req::name_info |
( |
socket_address |
addr, |
|
|
int |
flags = 0 |
|
) |
| |
Async getnameinfo.
- Parameters
-
| addr | A valid instance of socket_address. |
| flags | Optional flags that modify the behavior of getnameinfo. |
- Returns
- Underlying return value.
◆ name_info_sync() [1/3]
| std::pair< bool, std::pair< const char *, const char * > > uvw::get_name_info_req::name_info_sync |
( |
const sockaddr & |
addr, |
|
|
int |
flags = 0 |
|
) |
| |
Sync getnameinfo.
- Parameters
-
| addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
| flags | Optional flags that modify the behavior of getnameinfo. |
- Returns
- A
std::pair composed as it follows:
- A boolean value that is true in case of success, false otherwise.
- A
std::pair composed as it follows:
- A
const char * containing a valid hostname.
- A
const char * containing a valid service name.
◆ name_info_sync() [2/3]
| std::pair< bool, std::pair< const char *, const char * > > uvw::get_name_info_req::name_info_sync |
( |
const std::string & |
ip, |
|
|
unsigned int |
port, |
|
|
int |
flags = 0 |
|
) |
| |
Sync getnameinfo.
- Parameters
-
| ip | A valid IP address. |
| port | A valid port number. |
| flags | Optional flags that modify the behavior of getnameinfo. |
- Returns
- A
std::pair composed as it follows:
- A boolean value that is true in case of success, false otherwise.
- A
std::pair composed as it follows:
- A
const char * containing a valid hostname.
- A
const char * containing a valid service name.
◆ name_info_sync() [3/3]
| std::pair< bool, std::pair< const char *, const char * > > uvw::get_name_info_req::name_info_sync |
( |
socket_address |
addr, |
|
|
int |
flags = 0 |
|
) |
| |
Sync getnameinfo.
- Parameters
-
| addr | A valid instance of socket_address. |
| flags | Optional flags that modify the behavior of getnameinfo. |
- Returns
- A
std::pair composed as it follows:
- A boolean value that is true in case of success, false otherwise.
- A
std::pair composed as it follows:
- A
const char * containing a valid hostname.
- A
const char * containing a valid service name.
The documentation for this class was generated from the following file: