xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Static Public Member Functions | List of all members
xtd::net::dns Class Reference

#include <dns.h>

Definition

Provides simple domain name resolution functionality.

Namespace
xtd::net
Library
xtd.core

Inherits xtd::static_object.

Static Public Member Functions

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.
 
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.
 
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.
 
static xtd::ustring get_host_name ()
 Gets the host name of the local computer.
 

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..

◆ 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.

◆ 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: