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:23
dns_end_point(const xtd::string &host, xtd::uint16 port)
Initializes a new instance of the xtd::net::dns_end_point class with the host name or string represen...
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
|
| auto | host () const noexcept -> const xtd::string & |
| | Gets the host name or string representation of the Internet Protocol (IP) address of the host.
|
| |
| auto | port () const noexcept -> xtd::uint16 |
| | Gets the port number of the endpoint.
|
| |
|
| auto | equals (const xtd::object &obj) const noexcept -> bool override |
| | Determines whether the specified object is equal to the current object.
|
| |
| auto | equals (const dns_end_point &other) const noexcept -> bool override |
| | Determines whether the specified object is equal to the current object.
|
| |
| auto | get_hash_code () const noexcept -> xtd::size override |
| | Serves as a hash function for a particular type.
|
| |
| auto | to_string () const noexcept -> xtd::string 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()
| auto xtd::net::dns_end_point::host |
( |
| ) |
const -> const xtd::string & |
|
nodiscardnoexcept |
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()
| auto xtd::net::dns_end_point::port |
( |
| ) |
const -> xtd::uint16 |
|
nodiscardnoexcept |
◆ equals() [1/2]
| auto xtd::net::dns_end_point::equals |
( |
const xtd::object & | obj | ) |
const -> bool |
|
nodiscardoverridevirtualnoexcept |
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]
| auto xtd::net::dns_end_point::equals |
( |
const dns_end_point & | other | ) |
const -> bool |
|
nodiscardoverridevirtualnoexcept |
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()
| auto xtd::net::dns_end_point::get_hash_code |
( |
| ) |
const -> xtd::size |
|
nodiscardoverridevirtualnoexcept |
Serves as a hash function for a particular type.
- Returns
- A hash code for the current object.
Reimplemented from xtd::object.
◆ to_string()
| auto xtd::net::dns_end_point::to_string |
( |
| ) |
const -> xtd::string |
|
nodiscardoverridevirtualnoexcept |
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: