LIBWIRE
Next-generation C++17 networking library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
libwire::dns Namespace Reference

Namespace with functions for interaction with system DNS resolver. More...

Functions

std::vector< addressresolve (ip protocol, const std::string_view &domain, std::error_code &ec) noexcept
 Resolve domain name to one or more IP addresses of 'protocol' version. More...
 
std::vector< addressresolve (ip protocol, const std::string_view &domain)
 Same as overload with error code but throws std::system_error instead of setting error code. More...
 

Detailed Description

Namespace with functions for interaction with system DNS resolver.

Function Documentation

std::vector<address> libwire::dns::resolve ( ip  protocol,
const std::string_view &  domain,
std::error_code &  ec 
)
noexcept

Resolve domain name to one or more IP addresses of 'protocol' version.

Note
Numeric IP addresses is accepted too and will be just copied to output.
Examples:
dns_query.cpp.
std::vector<address> libwire::dns::resolve ( ip  protocol,
const std::string_view &  domain 
)

Same as overload with error code but throws std::system_error instead of setting error code.