Shows how to use xtd::net::dns class.
#include <xtd/net/dns>
#include <xtd/console>
auto main() -> int {
auto host_entry = dns::get_host_entry("www.github.com");
console::write_line("ip host entry for : www.github.com");
console::write_line(" - host_name : {}", host_entry.host_name());
console::write_line(" - address list :");
for (auto address : host_entry.address_list())
console::write_line(" * {}", address);
console::write_line(" - aliases :");
for (auto alias : host_entry.aliases())
console::write_line(" * {}", alias);
}
The xtd::net namespace provides a simple programming interface for many of the protocols used on netw...
Definition cookie_exception.hpp:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10