xtd 0.2.0
Loading...
Searching...
No Matches
end_point.h
Go to the documentation of this file.
1
4#pragma once
5#include "socket_address.h"
7#include "../core_export.h"
8#include "../object.h"
9#include "../types.h"
10#include "../ustring.h"
11#include <memory>
12
14namespace xtd {
16 namespace net {
26 public:
28 end_point(end_point&& end_point) = default;
29 end_point(const end_point& end_point) = default;
30 end_point& operator =(const end_point&) = default;
32
34
40
42
48 virtual std::unique_ptr<end_point> create(const socket_address& socket_address) const;
49
52 virtual socket_address serialize() const;
53
56 ustring to_string() const noexcept override;
58
59 protected:
61
64 explicit end_point(sockets::address_family address_family) : address_family_(address_family) {}
66
68 end_point() = default;
69
70 sockets::address_family address_family_ = sockets::address_family::unknown;
72 };
73 }
74}
Contains xtd::net::sockets::address_family enum.
Identifies a network address. This is an abstract class.
Definition end_point.h:25
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:29
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
address_family
Specifies the addressing scheme that an instance of the xtd::net::sockets::socket class can use.
Definition address_family.h:28
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::net::socket_address class.