Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::asio::generic::basic_endpoint< Protocol > Class Template Reference

Describes an endpoint for any socket type. More...

#include <basic_endpoint.hpp>

Public Types

typedef Protocol protocol_type
 The protocol type associated with the endpoint. More...
 
typedef
boost::asio::detail::socket_addr_type 
data_type
 The type of the endpoint structure. More...
 

Public Member Functions

 basic_endpoint ()
 Default constructor. More...
 
 basic_endpoint (const void *socket_address, std::size_t socket_address_size, int socket_protocol=0)
 Construct an endpoint from the specified socket address. More...
 
template<typename Endpoint >
 basic_endpoint (const Endpoint &endpoint)
 Construct an endpoint from the specific endpoint type. More...
 
 basic_endpoint (const basic_endpoint &other)
 Copy constructor. More...
 
basic_endpointoperator= (const basic_endpoint &other)
 Assign from another endpoint. More...
 
protocol_type protocol () const
 The protocol associated with the endpoint. More...
 
data_typedata ()
 Get the underlying endpoint in the native type. More...
 
const data_typedata () const
 Get the underlying endpoint in the native type. More...
 
std::size_t size () const
 Get the underlying size of the endpoint in the native type. More...
 
void resize (std::size_t new_size)
 Set the underlying size of the endpoint in the native type. More...
 
std::size_t capacity () const
 Get the capacity of the endpoint in the native type. More...
 

Friends

bool operator== (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
 Compare two endpoints for equality. More...
 
bool operator!= (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
 Compare two endpoints for inequality. More...
 
bool operator< (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
 Compare endpoints for ordering. More...
 
bool operator> (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
 Compare endpoints for ordering. More...
 
bool operator<= (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
 Compare endpoints for ordering. More...
 
bool operator>= (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
 Compare endpoints for ordering. More...
 

Detailed Description

template<typename Protocol>
class boost::asio::generic::basic_endpoint< Protocol >

Describes an endpoint for any socket type.

The boost::asio::generic::basic_endpoint class template describes an endpoint that may be associated with any socket type.

Note
The socket types sockaddr type must be able to fit into a sockaddr_storage structure.
Thread Safety
Distinct objects: Safe.
Shared objects: Unsafe.
Concepts:
Endpoint.

Member Typedef Documentation

template<typename Protocol>
typedef boost::asio::detail::socket_addr_type boost::asio::generic::basic_endpoint< Protocol >::data_type

The type of the endpoint structure.

This type is dependent on the underlying implementation of the socket layer.

template<typename Protocol>
typedef Protocol boost::asio::generic::basic_endpoint< Protocol >::protocol_type

The protocol type associated with the endpoint.

Constructor & Destructor Documentation

template<typename Protocol>
boost::asio::generic::basic_endpoint< Protocol >::basic_endpoint ( )
inline

Default constructor.

template<typename Protocol>
boost::asio::generic::basic_endpoint< Protocol >::basic_endpoint ( const void *  socket_address,
std::size_t  socket_address_size,
int  socket_protocol = 0 
)
inline

Construct an endpoint from the specified socket address.

template<typename Protocol>
template<typename Endpoint >
boost::asio::generic::basic_endpoint< Protocol >::basic_endpoint ( const Endpoint &  endpoint)
inline

Construct an endpoint from the specific endpoint type.

template<typename Protocol>
boost::asio::generic::basic_endpoint< Protocol >::basic_endpoint ( const basic_endpoint< Protocol > &  other)
inline

Copy constructor.

Member Function Documentation

template<typename Protocol>
std::size_t boost::asio::generic::basic_endpoint< Protocol >::capacity ( ) const
inline

Get the capacity of the endpoint in the native type.

template<typename Protocol>
data_type* boost::asio::generic::basic_endpoint< Protocol >::data ( )
inline

Get the underlying endpoint in the native type.

template<typename Protocol>
const data_type* boost::asio::generic::basic_endpoint< Protocol >::data ( ) const
inline

Get the underlying endpoint in the native type.

template<typename Protocol>
basic_endpoint& boost::asio::generic::basic_endpoint< Protocol >::operator= ( const basic_endpoint< Protocol > &  other)
inline

Assign from another endpoint.

template<typename Protocol>
protocol_type boost::asio::generic::basic_endpoint< Protocol >::protocol ( ) const
inline

The protocol associated with the endpoint.

template<typename Protocol>
void boost::asio::generic::basic_endpoint< Protocol >::resize ( std::size_t  new_size)
inline

Set the underlying size of the endpoint in the native type.

template<typename Protocol>
std::size_t boost::asio::generic::basic_endpoint< Protocol >::size ( ) const
inline

Get the underlying size of the endpoint in the native type.

Friends And Related Function Documentation

template<typename Protocol>
bool operator!= ( const basic_endpoint< Protocol > &  e1,
const basic_endpoint< Protocol > &  e2 
)
friend

Compare two endpoints for inequality.

template<typename Protocol>
bool operator< ( const basic_endpoint< Protocol > &  e1,
const basic_endpoint< Protocol > &  e2 
)
friend

Compare endpoints for ordering.

template<typename Protocol>
bool operator<= ( const basic_endpoint< Protocol > &  e1,
const basic_endpoint< Protocol > &  e2 
)
friend

Compare endpoints for ordering.

template<typename Protocol>
bool operator== ( const basic_endpoint< Protocol > &  e1,
const basic_endpoint< Protocol > &  e2 
)
friend

Compare two endpoints for equality.

template<typename Protocol>
bool operator> ( const basic_endpoint< Protocol > &  e1,
const basic_endpoint< Protocol > &  e2 
)
friend

Compare endpoints for ordering.

template<typename Protocol>
bool operator>= ( const basic_endpoint< Protocol > &  e1,
const basic_endpoint< Protocol > &  e2 
)
friend

Compare endpoints for ordering.


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