uvw 2.12.1
Loading...
Searching...
No Matches
uvw::GetNameInfoReq Class Referencefinal

The GetNameInfoReq request. More...

#include <dns.h>

Inheritance diagram for uvw::GetNameInfoReq:
Collaboration diagram for uvw::GetNameInfoReq:

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.
 
- Public Member Functions inherited from uvw::Request< GetNameInfoReq, uv_getnameinfo_t >
bool cancel ()
 Cancels a pending request.
 
std::size_t size () const noexcept
 Returns the size of the underlying request type.
 
- Public Member Functions inherited from uvw::Resource< GetNameInfoReq, uv_getnameinfo_t >
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.
 
- Public Member Functions inherited from uvw::UnderlyingType< GetNameInfoReq, uv_getnameinfo_t >
Looploop () 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.
 
- Public Member Functions inherited from uvw::Emitter< GetNameInfoReq >
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

- Public Types inherited from uvw::Emitter< GetNameInfoReq >
- Static Public Member Functions inherited from uvw::UnderlyingType< GetNameInfoReq, uv_getnameinfo_t >
static std::shared_ptr< GetNameInfoReqcreate (Args &&...args)
 Creates a new resource of the given type.
 
- Protected Types inherited from uvw::Resource< GetNameInfoReq, uv_getnameinfo_t >
- Protected Member Functions inherited from uvw::Request< GetNameInfoReq, uv_getnameinfo_t >
- Protected Member Functions inherited from uvw::Resource< GetNameInfoReq, uv_getnameinfo_t >
- Protected Member Functions inherited from uvw::UnderlyingType< GetNameInfoReq, uv_getnameinfo_t >
- Protected Member Functions inherited from uvw::Emitter< GetNameInfoReq >
- Static Protected Member Functions inherited from uvw::Request< GetNameInfoReq, uv_getnameinfo_t >

Detailed Description

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.

Definition at line 150 of file dns.h.

Member Function Documentation

◆ nameInfo() [1/3]

template<typename I = IPv4>
void uvw::GetNameInfoReq::nameInfo ( Addr addr,
int flags = 0 )

Async getnameinfo.

Parameters
addrA valid instance of Addr.
flagsOptional flags that modify the behavior of getnameinfo.

◆ nameInfo() [2/3]

void uvw::GetNameInfoReq::nameInfo ( const sockaddr & addr,
int flags = 0 )

Async getnameinfo.

Parameters
addrInitialized sockaddr_in or sockaddr_in6 data structure.
flagsOptional flags that modify the behavior of getnameinfo.

◆ nameInfo() [3/3]

template<typename I = IPv4>
void uvw::GetNameInfoReq::nameInfo ( const std::string & ip,
unsigned int port,
int flags = 0 )

Async getnameinfo.

Parameters
ipA valid IP address.
portA valid port number.
flagsOptional flags that modify the behavior of getnameinfo.

◆ nameInfoSync() [1/3]

template<typename I = IPv4>
std::pair< bool, std::pair< const char *, const char * > > uvw::GetNameInfoReq::nameInfoSync ( Addr addr,
int flags = 0 )

Sync getnameinfo.

Parameters
addrA valid instance of Addr.
flagsOptional 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.

◆ nameInfoSync() [2/3]

std::pair< bool, std::pair< const char *, const char * > > uvw::GetNameInfoReq::nameInfoSync ( const sockaddr & addr,
int flags = 0 )

Sync getnameinfo.

Parameters
addrInitialized sockaddr_in or sockaddr_in6 data structure.
flagsOptional 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.

◆ nameInfoSync() [3/3]

template<typename I = IPv4>
std::pair< bool, std::pair< const char *, const char * > > uvw::GetNameInfoReq::nameInfoSync ( const std::string & ip,
unsigned int port,
int flags = 0 )

Sync getnameinfo.

Parameters
ipA valid IP address.
portA valid port number.
flagsOptional 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: