1#ifndef UVW_DNS_INCLUDE_H
2#define UVW_DNS_INCLUDE_H
16 using deleter = void (*)(addrinfo *);
26 std::unique_ptr<addrinfo, deleter>
data;
59 static void addr_info_callback(uv_getaddrinfo_t *req,
int status, addrinfo *res);
60 int node_addr_info(
const char *node,
const char *service, addrinfo *hints =
nullptr);
61 auto node_addr_info_sync(
const char *node,
const char *service, addrinfo *hints =
nullptr);
64 using deleter = void (*)(addrinfo *);
66 using request::request;
88 std::pair<bool, std::unique_ptr<addrinfo, deleter>>
node_addr_info_sync(
const std::string &node, addrinfo *hints =
nullptr);
110 std::pair<bool, std::unique_ptr<addrinfo, deleter>>
service_addr_info_sync(
const std::string &service, addrinfo *hints =
nullptr);
120 int addr_info(
const std::string &node,
const std::string &service, addrinfo *hints =
nullptr);
134 std::pair<bool, std::unique_ptr<addrinfo, deleter>>
addr_info_sync(
const std::string &node,
const std::string &service, addrinfo *hints =
nullptr);
146 static void name_info_callback(uv_getnameinfo_t *req,
int status,
const char *hostname,
const char *service);
149 using request::request;
166 int name_info(
const std::string &ip,
unsigned int port,
int flags = 0);
188 std::pair<bool, std::pair<const char *, const char *>>
name_info_sync(
const sockaddr &addr,
int flags = 0);
203 std::pair<bool, std::pair<const char *, const char *>>
name_info_sync(
const std::string &ip,
unsigned int port,
int flags = 0);
std::pair< bool, std::unique_ptr< addrinfo, deleter > > node_addr_info_sync(const std::string &node, addrinfo *hints=nullptr)
Sync getaddrinfo.
int node_addr_info(const std::string &node, addrinfo *hints=nullptr)
Async getaddrinfo.
int service_addr_info(const std::string &service, addrinfo *hints=nullptr)
Async getaddrinfo.
int addr_info(const std::string &node, const std::string &service, addrinfo *hints=nullptr)
Async getaddrinfo.
std::pair< bool, std::unique_ptr< addrinfo, deleter > > service_addr_info_sync(const std::string &service, addrinfo *hints=nullptr)
Sync getaddrinfo.
std::pair< bool, std::unique_ptr< addrinfo, deleter > > addr_info_sync(const std::string &node, const std::string &service, addrinfo *hints=nullptr)
Sync getaddrinfo.
std::pair< bool, std::pair< const char *, const char * > > name_info_sync(const sockaddr &addr, int flags=0)
Sync getnameinfo.
int name_info(const std::string &ip, unsigned int port, int flags=0)
Async getnameinfo.
std::pair< bool, std::pair< const char *, const char * > > name_info_sync(socket_address addr, int flags=0)
Sync getnameinfo.
int name_info(const sockaddr &addr, 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 std::string &ip, unsigned int port, int flags=0)
Sync getnameinfo.
std::unique_ptr< addrinfo, deleter > data
An initialized instance of addrinfo.
const char * service
A valid service name.
const char * hostname
A valid hostname.