xtd 0.2.0
Loading...
Searching...
No Matches
ip_host_entry.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "ip_address.hpp"
6#include "../core_export.hpp"
7#include "../object.hpp"
8#include "../types.hpp"
9#include "../string.hpp"
10#include <vector>
11
13namespace xtd {
15 namespace net {
27 public:
29
32 ip_host_entry() = default;
34
38 auto operator =(ip_host_entry&&) -> ip_host_entry& = default;
39 auto operator =(const ip_host_entry&) -> ip_host_entry& = default;
41
43
47 [[nodiscard]] auto address_list() const noexcept -> const xtd::array<xtd::net::ip_address>&;
50 [[nodiscard]] auto address_list() noexcept -> xtd::array<xtd::net::ip_address>&;
55
58 [[nodiscard]] auto aliases() const noexcept -> const xtd::array<xtd::string>&;
61 [[nodiscard]] auto aliases() noexcept -> xtd::array<xtd::string>&;
65 auto aliases(const xtd::array<xtd::string>& aliases) noexcept -> ip_host_entry&;
66
69 [[nodiscard]] auto host_name() const noexcept -> const xtd::string&;
73 auto host_name(const xtd::string& host_name) noexcept -> ip_host_entry&;
75
76 private:
77 xtd::array<xtd::net::ip_address> address_list_;
78 xtd::array<xtd::string> aliases_;
79 xtd::string host_name_;
80 };
81 }
82}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Provides an Internet Protocol (IP) address.
Definition ip_address.hpp:42
ip_host_entry()=default
Initializes a new instance of the xtd::net::ip_host_entry.
auto host_name() const noexcept -> const xtd::string &
Gets the DNS name of the host.
auto address_list() const noexcept -> const xtd::array< xtd::net::ip_address > &
Gets List of IP addresses that are associated with a host.
auto aliases() const noexcept -> const xtd::array< xtd::string > &
Gets List of aliases that are associated with a host.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Contains core_export_ keyword.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
The xtd::net namespace provides a simple programming interface for many of the protocols used on netw...
Definition cookie_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::net::ip_address class.
Contains xtd::object class.
Contains xtd::string alias.
Contains xtd fundamental types.