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.
Loading...
Searching...
No Matches
dns_end_point.h
Go to the documentation of this file.
1
4#pragma once
5
6#include "end_point.h"
7
9namespace xtd {
11 namespace net {
19 public:
26 dns_end_point(const xtd::ustring& host, uint16_t port);
27
35 dns_end_point(const xtd::ustring& host, uint16_t port, sockets::address_family address_family);
36
38 dns_end_point(dns_end_point&&) = default;
39 dns_end_point(const dns_end_point&) = default;
40 dns_end_point& operator=(const dns_end_point&) = default;
41 friend std::ostream& operator <<(std::ostream& os, const dns_end_point& end_point) noexcept {return os << end_point.to_string();}
43
46 const xtd::ustring& host() const noexcept;
47
50 uint16_t port() const noexcept;
51
54 xtd::ustring to_string() const noexcept override;
55
56 private:
57 xtd::ustring host_;
58 uint16_t port_ = 0;
59 };
60 }
61}
Represents a network endpoint as a host name or a string representation of an IP address and a port n...
Definition: dns_end_point.h:18
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 represen...
const xtd::ustring & host() const noexcept
Gets the host name or string representation of the Internet Protocol (IP) address of the host.
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 represen...
Identifies a network address. This is an abstract class.
Definition: end_point.h:24
ustring to_string() const noexcept override
Returns a string that represents the current object.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::net::end_point class.
#define core_export_
Define shared library export.
Definition: core_export.h:13
address_family
Specifies the addressing scheme that an instance of the xtd::net::sockets::socket class can use.
Definition: address_family.h:24
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17