xtd - Reference Guide 0.2.0
dns_end_point.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "end_point.h"
7 
9 namespace xtd {
11  namespace net {
18  class core_export_ dns_end_point : public xtd::net::end_point {
19  public:
21 
29  dns_end_point(const xtd::ustring& host, uint16_t port);
30 
40 
42  dns_end_point(dns_end_point&&) = default;
43  dns_end_point(const dns_end_point&) = default;
44  dns_end_point& operator=(const dns_end_point&) = default;
45  friend std::ostream& operator <<(std::ostream& os, const dns_end_point& end_point) noexcept {return os << end_point.to_string();}
47 
49 
53  const xtd::ustring& host() const noexcept;
54 
57  uint16_t port() const noexcept;
59 
61 
65  xtd::ustring to_string() const noexcept override;
67 
68  private:
69  xtd::ustring host_;
70  uint16_t port_ = 0;
71  };
72  }
73 }
The xtd::uri::host data.
xtd::ustring to_string() const noexcept override
Returns a string that represents the current object.
Identifies a network address. This is an abstract class.
Definition: end_point.h:24
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::net::end_point class.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1110
The xtd::uri::port data.
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
address_family
Specifies the addressing scheme that an instance of the xtd::net::sockets::socket class can use...
Definition: address_family.h:27