xtd 0.2.0
Loading...
Searching...
No Matches
end_point.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "socket_address.hpp"
7#include "../core_export.hpp"
8#include "../object.hpp"
9#include "../types.hpp"
10#include "../string.hpp"
11#include <memory>
12
14namespace xtd {
16 namespace net {
28 public:
30 end_point(end_point&& end_point) = default;
31 end_point(const end_point& end_point) = default;
32 auto operator =(end_point&&) -> end_point& = default;
33 auto operator =(const end_point&) -> end_point& = default;
35
37
41 [[nodiscard]] auto address_family() const noexcept -> xtd::net::sockets::address_family;
43
45
51 [[nodiscard]] virtual auto create(const xtd::net::socket_address& socket_address) const -> xtd::uptr<xtd::net::end_point>;
52
55 [[nodiscard]] virtual auto serialize() const -> xtd::net::socket_address;
56
59 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
61
62 protected:
64
69
71 end_point() = default;
72
75 };
76 }
77}
Contains xtd::net::sockets::address_family enum.
Identifies a network address. This is an abstract class.
Definition end_point.hpp:27
auto address_family() const noexcept -> xtd::net::sockets::address_family
Gets the address family to which the endpoint belongs.
virtual auto create(const xtd::net::socket_address &socket_address) const -> xtd::uptr< xtd::net::end_point >
Creates an xtd::net::end_point instance from a socket_address instance.
virtual auto serialize() const -> xtd::net::socket_address
Serializes endpoint information into a socket_address instance.
end_point(xtd::net::sockets::address_family address_family)
Initializes a new instance of the xtd::net::end_point class.
Definition end_point.hpp:67
auto to_string() const noexcept -> xtd::string override
Returns a string that represents the current object.
Stores serialized information from end_point derived classes. #par Deinition.
Definition socket_address.hpp:36
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
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
address_family
Specifies the addressing scheme that an instance of the xtd::net::sockets::socket class can use.
Definition address_family.hpp:30
@ unknown
Unknown address family.
Definition address_family.hpp:32
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
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::net::socket_address class.
Contains xtd::string alias.
Contains xtd fundamental types.