xtd 0.2.0
xtd::net::dns Class Reference

Definition

Provides simple domain name resolution functionality.

Header
#include <xtd/net/dns>
Namespace
xtd::net
Library
xtd.core

Methods

static std::vector< xtd::net::ip_addressget_host_addresses (const xtd::ustring &host_name_or_address)
 Returns the Internet Protocol (IP) addresses for the specified host. More...
 
static xtd::net::ip_host_entry get_host_entry (const ip_address &address)
 Resolves an IP address to an xtd::net::ip_host_entry instance. More...
 
static xtd::net::ip_host_entry get_host_entry (const xtd::ustring &host_name_or_address)
 Resolves a host name or IP address to an xtd::net::ip_host_entry instance. More...
 
static xtd::ustring get_host_name ()
 Gets the host name of the local computer. More...
 

Member Function Documentation

◆ get_host_addresses()

static std::vector<xtd::net::ip_address> xtd::net::dns::get_host_addresses ( const xtd::ustring host_name_or_address)
static

Returns the Internet Protocol (IP) addresses for the specified host.

Parameters
host_name_or_addressThe host name or IP address to resolve.
Returns
An array of type xtd::net::ip_address that holds the IP addresses for the host that is specified by the host_name_or_address parameter..
Examples:
dns_get_host_addresses.cpp.

◆ get_host_entry() [1/2]

static xtd::net::ip_host_entry xtd::net::dns::get_host_entry ( const ip_address address)
static

Resolves an IP address to an xtd::net::ip_host_entry instance.

Parameters
addressAn IP address.
Returns
An xtd::net::ip_host_entry instance that contains address information about the host specified in address.
Examples:
dns_get_host_entry.cpp.

◆ get_host_entry() [2/2]

static xtd::net::ip_host_entry xtd::net::dns::get_host_entry ( const xtd::ustring host_name_or_address)
static

Resolves a host name or IP address to an xtd::net::ip_host_entry instance.

Parameters
host_name_or_addressThe host name or IP address to resolve.
Returns
An xtd::net::ip_host_entry instance that contains address information about the host specified in host_name_or_address.

◆ get_host_name()

static xtd::ustring xtd::net::dns::get_host_name ( )
static

Gets the host name of the local computer.

Returns
string A string that contains the DNS host name of the local computer.

The documentation for this class was generated from the following file: