xtd 0.2.0
xtd::net::end_point Class Reference

Definition

Identifies a network address. This is an abstract class.

Header
#include <xtd/net/end_point>
Namespace
xtd::net
Library
xtd.core

Properties

sockets::address_family address_family () const noexcept
 Gets the address family to which the endpoint belongs. More...
 

Methods

virtual std::unique_ptr< end_pointcreate (const socket_address &socket_address) const
 Creates an xtd::net::end_point instance from a socket_address instance. More...
 
virtual socket_address serialize () const
 Serializes endpoint information into a socket_address instance. More...
 
ustring to_string () const noexcept override
 Returns a string that represents the current object. More...
 

Protected constructors

 end_point (sockets::address_family address_family)
 Initializes a new instance of the xtd::net::end_point class. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Constructor & Destructor Documentation

◆ end_point()

xtd::net::end_point::end_point ( sockets::address_family  address_family)
inlineexplicitprotected

Initializes a new instance of the xtd::net::end_point class.

Member Function Documentation

◆ address_family()

sockets::address_family xtd::net::end_point::address_family ( ) const
noexcept

Gets the address family to which the endpoint belongs.

Returns
One of the address_family values.

◆ create()

virtual std::unique_ptr<end_point> xtd::net::end_point::create ( const socket_address socket_address) const
virtual

Creates an xtd::net::end_point instance from a socket_address instance.

Parameters
socket_addressThe socket address that serves as the endpoint for a connection.
Returns
A new xtd::net::end_point instance that is initialized from the specified xtd::net::socket_address instance.
Exceptions
xtd::not_supported_exceptionAny attempt is made to access the method when the method is not overridden in a descendant class.

Reimplemented in xtd::net::ip_end_point.

◆ serialize()

virtual socket_address xtd::net::end_point::serialize ( ) const
virtual

Serializes endpoint information into a socket_address instance.

Returns
A new xtd::net::socket_address instance that contains the endpoint information.

Reimplemented in xtd::net::ip_end_point.

◆ to_string()

ustring xtd::net::end_point::to_string ( ) const
overridevirtualnoexcept

Returns a string that represents the current object.

Returns
A string that represents the current object.

Reimplemented from xtd::object.

Reimplemented in xtd::net::ip_end_point.


The documentation for this class was generated from the following file: