xtd 0.2.0
Loading...
Searching...
No Matches
ip_host_entry.h
Go to the documentation of this file.
1
4#pragma once
5#include "ip_address.h"
6#include "../core_export.h"
7#include "../object.h"
8#include "../types.h"
9#include "../ustring.h"
10#include <vector>
11
13namespace xtd {
15 namespace net {
25 public:
27
30 ip_host_entry() = default;
32
36 ip_host_entry& operator =(const ip_host_entry&) = default;
38
40
44 const std::vector<xtd::net::ip_address>& address_list() const noexcept;
47 std::vector<xtd::net::ip_address>& address_list() noexcept;
51 ip_host_entry& address_list(const std::vector<xtd::net::ip_address>& address_list) noexcept;
52
55 const std::vector<xtd::ustring>& aliases() const noexcept;
58 std::vector<xtd::ustring>& aliases() noexcept;
62 ip_host_entry& aliases(const std::vector<xtd::ustring>& aliases) noexcept;
63
66 const xtd::ustring& host_name() const noexcept;
70 ip_host_entry& host_name(const xtd::ustring& host_name) noexcept;
72
73 private:
74 std::vector<xtd::net::ip_address> address_list_;
75 std::vector<xtd::ustring> aliases_;
76 xtd::ustring host_name_;
77 };
78 }
79}
Provides an Internet Protocol (IP) address.
Definition ip_address.h:35
Provides a container class for Internet host address information.
Definition ip_host_entry.h:24
ip_host_entry()=default
Initializes a new instance of the xtd::net::ip_host_entry.
const std::vector< xtd::net::ip_address > & address_list() const noexcept
Gets List of IP addresses that are associated with a host.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
#define core_export_
Define shared library export.
Definition core_export.h:13
Contains xtd::net::ip_address class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10