xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
end_point.h
Go to the documentation of this file.
1
4#pragma once
5
6#include <memory>
7#include "../core_export.h"
8#include "../object.h"
9#include "../types.h"
10#include "../ustring.h"
11#include "socket_address.h"
13
15namespace xtd {
17 namespace net {
25 public:
27 end_point(end_point&& end_point) = default;
28 end_point(const end_point& end_point) = default;
29 end_point& operator=(const end_point&) = default;
30 friend std::ostream& operator <<(std::ostream& os, const end_point& end_point) noexcept {return os << end_point.to_string();}
32
37 virtual std::unique_ptr<end_point> create(const socket_address& socket_address) const;
38
42
45 virtual socket_address serialize() const;
46
49 ustring to_string() const noexcept override;
50
51 protected:
53 explicit end_point(sockets::address_family address_family) : address_family_(address_family) {}
54
56 end_point() = default;
57
58 sockets::address_family address_family_ = sockets::address_family::unknown;
60 };
61 }
62}
Contains xtd::net::sockets::address_family enum.
Identifies a network address. This is an abstract class.
Definition end_point.h:24
virtual std::unique_ptr< end_point > create(const socket_address &socket_address) const
Creates an xtd::net::end_point instance from a socket_address instance.
ustring to_string() const noexcept override
Returns a string that represents the current object.
sockets::address_family address_family() const noexcept
Gets the address family to which the endpoint belongs.
Stores serialized information from end_point derived classes.
Definition socket_address.h:28
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:26
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:48
#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
Contains xtd::net::socket_address class.