xtd - Reference Guide
0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <dns_end_point.h>
Represents a network endpoint as a host name or a string representation of an IP address and a port number.
Inherits xtd::net::end_point.
Public Member Functions | |
dns_end_point (const xtd::ustring &host, uint16_t port) | |
Initializes a new instance of the xtd::net::dns_end_point class with the host name or string representation of an IP address and a port number. | |
dns_end_point (const xtd::ustring &host, uint16_t port, sockets::address_family address_family) | |
Initializes a new instance of the xtd::net::dns_end_point class with the host name or string representation of an IP address, a port number, and an address family. | |
const xtd::ustring & | host () const noexcept |
Gets the host name or string representation of the Internet Protocol (IP) address of the host. | |
uint16_t | port () const noexcept |
Gets the port number of the endpoint. | |
xtd::ustring | to_string () const noexcept override |
Returns a string that represents the current object. | |
Public Member Functions inherited from xtd::net::end_point | |
sockets::address_family | address_family () const noexcept |
Gets the address family to which the endpoint belongs. | |
virtual std::unique_ptr< end_point > | create (const socket_address &socket_address) const |
Creates an xtd::net::end_point instance from a socket_address instance. | |
virtual socket_address | serialize () const |
Serializes endpoint information into a socket_address instance. | |
ustring | to_string () const noexcept override |
Returns a string that represents the current object. | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. | |
virtual xtd::ustring | to_string () const noexcept |
Returns a std::string that represents the current object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
Protected Member Functions inherited from xtd::net::end_point | |
end_point (sockets::address_family address_family) | |
Initializes a new instance of the xtd::net::end_point class. | |
xtd::net::dns_end_point::dns_end_point | ( | const xtd::ustring & | host, |
uint16_t | port | ||
) |
Initializes a new instance of the xtd::net::dns_end_point class with the host name or string representation of an IP address and a port number.
host | The host name or a string representation of the IP address. |
port | The port number associated with the address, or 0 to specify any available port. port is in host order. |
xtd::argument_exception | The host parameter contains an empty string. |
xtd::net::dns_end_point::dns_end_point | ( | const xtd::ustring & | host, |
uint16_t | port, | ||
sockets::address_family | address_family | ||
) |
Initializes a new instance of the xtd::net::dns_end_point class with the host name or string representation of an IP address, a port number, and an address family.
host | The host name or a string representation of the IP address. |
port | The port number associated with the address, or 0 to specify any available port. port is in host order. |
address_family | One of the xtd::net::sockets::address_family values. |
xtd::argument_exception | The host parameter contains an empty string. |
|
noexcept |
Gets the host name or string representation of the Internet Protocol (IP) address of the host.
|
noexcept |
Gets the port number of the endpoint.
|
overridevirtualnoexcept |
Returns a string that represents the current object.
Reimplemented from xtd::object.