Represents a network endpoint as a host name or a string representation of an IP address and a port number.
- Definition
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Represents a network endpoint as a host name or a string representation of an IP address and a port n...
Definition dns_end_point.hpp:26
Identifies a network address. This is an abstract class.
Definition end_point.hpp:27
#define core_export_
Define shared library export.
Definition core_export.hpp:13
- Header
#include <xtd/net/dns_end_point>
- Namespace
- xtd::net
- Library
- xtd.core
|
const xtd::string & | host () const noexcept |
| Gets the host name or string representation of the Internet Protocol (IP) address of the host.
|
|
uint16 | port () const noexcept |
| Gets the port number of the endpoint.
|
|
|
bool | equals (const object &obj) const noexcept override |
| Determines whether the specified object is equal to the current object.
|
|
bool | equals (const dns_end_point &other) const noexcept override |
| Determines whether the specified object is equal to the current object.
|
|
xtd::size | get_hash_code () const noexcept override |
| Serves as a hash function for a particular type.
|
|
xtd::string | to_string () const noexcept override |
| Returns a string that represents the current object.
|
|
◆ dns_end_point() [1/2]
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.
- Parameters
-
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. |
- Exceptions
-
◆ dns_end_point() [2/2]
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.
- Parameters
-
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. |
- Exceptions
-
◆ host()
const xtd::string & xtd::net::dns_end_point::host |
( |
| ) |
const |
|
noexcept |
Gets the host name or string representation of the Internet Protocol (IP) address of the host.
- Returns
- The host name or a string representation of the IP address.
◆ port()
uint16 xtd::net::dns_end_point::port |
( |
| ) |
const |
|
noexcept |
◆ equals() [1/2]
bool xtd::net::dns_end_point::equals |
( |
const object & |
obj | ) |
const |
|
overridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
- Parameters
-
obj | The object to compare with the current object. |
- Returns
true
if the specified object is equal to the current object. otherwise, false
.
Reimplemented from xtd::object.
◆ equals() [2/2]
bool xtd::net::dns_end_point::equals |
( |
const dns_end_point & |
other | ) |
const |
|
overridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
- Parameters
-
other | The object to compare with the current object. |
- Returns
true
if the specified object is equal to the current object. otherwise, false
.
Implements xtd::iequatable< xtd::net::dns_end_point >.
◆ get_hash_code()
xtd::size xtd::net::dns_end_point::get_hash_code |
( |
| ) |
const |
|
overridevirtualnoexcept |
Serves as a hash function for a particular type.
- Returns
- A hash code for the current object.
Reimplemented from xtd::object.
◆ to_string()
xtd::string xtd::net::dns_end_point::to_string |
( |
| ) |
const |
|
overridevirtualnoexcept |
Returns a string that represents the current object.
- Returns
- string A string that represents the current object.
Reimplemented from xtd::object.
The documentation for this class was generated from the following file: