xtd 0.2.0
dns_end_point.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "end_point.hpp"
6#include "../iequatable.hpp"
7
9namespace xtd {
11 namespace net {
26 class core_export_ dns_end_point : public xtd::net::end_point, public xtd::iequatable<xtd::net::dns_end_point> {
27 public:
29
37 dns_end_point(const xtd::string& host, uint16 port);
38
46 dns_end_point(const xtd::string& host, uint16 port, sockets::address_family address_family);
48
50 dns_end_point(dns_end_point&&) = default;
51 dns_end_point(const dns_end_point&) = default;
52 dns_end_point& operator =(const dns_end_point&) = default;
54
56
60 const xtd::string& host() const noexcept;
61
64 uint16 port() const noexcept;
66
68
73 bool equals(const object& obj) const noexcept override;
77 bool equals(const dns_end_point& other) const noexcept override;
78
81 xtd::size get_hash_code() const noexcept override;
82
85 xtd::string to_string() const noexcept override;
87
88 private:
89 xtd::string host_;
90 uint16 port_ = 0;
91 };
92 }
93}
Represents text as a sequence of character units.
Definition basic_string.hpp:71
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
dns_end_point(const xtd::string &host, uint16 port)
Initializes a new instance of the xtd::net::dns_end_point class with the host name or string represen...
dns_end_point(const xtd::string &host, uint16 port, sockets::address_family address_family)
Initializes a new instance of the xtd::net::dns_end_point class with the host name or string represen...
const xtd::string & host() const noexcept
Gets the host name or string representation of the Internet Protocol (IP) address of the host.
Identifies a network address. This is an abstract class.
Definition end_point.hpp:27
Contains xtd::net::end_point class.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
address_family
Specifies the addressing scheme that an instance of the xtd::net::sockets::socket class can use.
Definition address_family.hpp:30
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10