#include <xtd/net/sockets/socket>
#include <xtd/net/dns>
#include <xtd/net/ip_address>
#include <xtd/text/string_builder>
#include <xtd/console>
#include <xtd/startup>
#include <regex>
class test_ip_address {
public:
auto rex = std::regex {R"(^[a-zA-Z]\w{1,39}$)"};
} else {
server = args[0];
if (!regex_match(server.chars(), rex)) {
return;
}
}
ip_addresses(server.to_string());
ip_address_additional_info();
}
private:
static void ip_addresses(const string& server) {
try {
for (auto cur_add : heserver.address_list()) {
auto bytes = cur_add.get_address_bytes();
for (
size_t i = 0;
i < bytes.size();
i++)
}
}
}
static void ip_address_additional_info() {
try {
}
}
}
};
virtual size_type size() const noexcept
Returns the number of elements in the container, i.e. std::distance(xtd::array::begin(),...
Definition basic_array.hpp:246
static void write(arg_t &&value)
Writes the text representation of the specified value to the standard output stream.
Definition console.hpp:462
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static xtd::string get_host_name()
Gets the host name of the local computer.
static xtd::net::ip_host_entry get_host_entry(const ip_address &address)
Resolves an IP address to an xtd::net::ip_host_entry instance.
static const ip_address ip_v6_none
Provides an IP address that indicates that no network interface should be used. This field is constan...
Definition ip_address.hpp:62
static const ip_address loopback
Provides the IP loopback address. This field is constant.
Definition ip_address.hpp:65
static const ip_address ip_v6_loopback
Provides the IP loopback address. This field is constant.
Definition ip_address.hpp:58
static const ip_address ip_v6_any
The Socket::Bind method uses the cIPv6Any field to indicate that a Socket must listen for client acti...
Definition ip_address.hpp:55
static bool is_loopback(const ip_address &address)
Indicates whether the specified IP address is the loopback address.
static bool os_supports_ip_v6() noexcept
Indicates whether the underlying operating system and network adaptors support Internet Protocol vers...
static bool os_supports_ip_v4() noexcept
Indicates whether the underlying operating system and network adaptors support Internet Protocol vers...
The exception that is thrown when a method call is invalid for the object's current state.
Definition system_exception.hpp:18
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:168
xtd::text::basic_string_builder< char > string_builder
Represents a mutable string of characters of UTF-8 code units. This class cannot be inherited.
Definition string_builder.hpp:19
xtd::array< xtd::string > argument_collection
Represents the collection of arguments passed to the main entry point method.
Definition argument_collection.hpp:19
@ inter_network_v6
Address for IP version 6.
Definition address_family.hpp:82
@ i
The I key.
Definition console_key.hpp:104
@ e
The E key.
Definition console_key.hpp:96
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
The xtd::net::sockets namespace provides a managed implementation of the Berkeley Sockets interface f...
Definition address_family.hpp:16
The xtd::net namespace provides a simple programming interface for many of the protocols used on netw...
Definition cookie_exception.hpp:10
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8