xtd 0.2.0
Loading...
Searching...
No Matches
dns_get_host_addresses.cpp

Shows how to use xtd::net::dns class.

#include <xtd/net/dns>
#include <xtd/console>
using namespace xtd;
using namespace xtd::net;
auto main() -> int {
auto addresses = dns::get_host_addresses("www.google.com");
console::write_line("www.google.com addresses:");
for (auto address : addresses)
console::write_line(" * {}", address);
}
// This code produces the following output :
//
// www.google.com addresses:
// * 216.58.208.100
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