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

The GetAddrInfoReq request. More...

#include <dns.h>

Inheritance diagram for uvw::GetAddrInfoReq:
Collaboration diagram for uvw::GetAddrInfoReq:

Public Member Functions

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.
 
- Public Member Functions inherited from uvw::Request< GetAddrInfoReq, uv_getaddrinfo_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< GetAddrInfoReq, uv_getaddrinfo_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< GetAddrInfoReq, uv_getaddrinfo_t >
Looploop () 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.
 
- Public Member Functions inherited from uvw::Emitter< GetAddrInfoReq >
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< GetAddrInfoReq >
- Static Public Member Functions inherited from uvw::UnderlyingType< GetAddrInfoReq, uv_getaddrinfo_t >
static std::shared_ptr< GetAddrInfoReqcreate (Args &&...args)
 Creates a new resource of the given type.
 
- Protected Types inherited from uvw::Resource< GetAddrInfoReq, uv_getaddrinfo_t >
- Protected Member Functions inherited from uvw::Request< GetAddrInfoReq, uv_getaddrinfo_t >
- Protected Member Functions inherited from uvw::Resource< GetAddrInfoReq, uv_getaddrinfo_t >
- Protected Member Functions inherited from uvw::UnderlyingType< GetAddrInfoReq, uv_getaddrinfo_t >
- Protected Member Functions inherited from uvw::Emitter< GetAddrInfoReq >
- Static Protected Member Functions inherited from uvw::Request< GetAddrInfoReq, uv_getaddrinfo_t >

Detailed Description

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.

Member Function Documentation

◆ addrInfo()

void uvw::GetAddrInfoReq::addrInfo ( const std::string & node,
const std::string & service,
addrinfo * hints = nullptr )

Async getaddrinfo.

Parameters
nodeEither a numerical network address or a network hostname.
serviceEither a service name or a port number as a string.
hintsOptional 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
nodeEither a numerical network address or a network hostname.
serviceEither a service name or a port number as a string.
hintsOptional 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
nodeEither a numerical network address or a network hostname.
hintsOptional 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
nodeEither a numerical network address or a network hostname.
hintsOptional 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
serviceEither a service name or a port number as a string.
hintsOptional 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
serviceEither a service name or a port number as a string.
hintsOptional 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: