asio::local::basic_endpoint< Protocol > Class Template Reference

Describes an endpoint for a UNIX socket. More...

#include <basic_endpoint.hpp>

List of all members.

Public Types

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

Public Member Functions

 basic_endpoint ()
 Default constructor.
 basic_endpoint (const char *path)
 Construct an endpoint using the specified path name.
 basic_endpoint (const std::string &path)
 Construct an endpoint using the specified path name.
 basic_endpoint (const basic_endpoint &other)
 Copy constructor.
basic_endpointoperator= (const basic_endpoint &other)
 Assign from another endpoint.
protocol_type protocol () const
 The protocol associated with the endpoint.
data_typedata ()
 Get the underlying endpoint in the native type.
const data_typedata () const
 Get the underlying endpoint in the native type.
std::size_t size () const
 Get the underlying size of the endpoint in the native type.
void resize (std::size_t size)
 Set the underlying size of the endpoint in the native type.
std::size_t capacity () const
 Get the capacity of the endpoint in the native type.
std::string path () const
 Get the path associated with the endpoint.
void path (const char *p)
 Set the path associated with the endpoint.
void path (const std::string &p)
 Set the path associated with the endpoint.

Private Member Functions

void init (const char *path, std::size_t path_length)

Private Attributes

union
asio::local::basic_endpoint::data_union 
data_
std::size_t path_length_

Friends

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

Related Functions

(Note that these are not member functions.)

template<typename Elem, typename Traits, typename Protocol>
std::basic_ostream< Elem,
Traits > & 
operator<< (std::basic_ostream< Elem, Traits > &os, const basic_endpoint< Protocol > &endpoint)
 Output an endpoint as a string.

Classes

union  data_union


Detailed Description

template<typename Protocol>
class asio::local::basic_endpoint< Protocol >

Describes an endpoint for a UNIX socket.

The asio::local::basic_endpoint class template describes an endpoint that may be associated with a particular UNIX socket.

Thread Safety
Distinct objects: Safe.
Shared objects: Unsafe.
Concepts:
Endpoint.

Member Typedef Documentation

template<typename Protocol>
typedef Protocol asio::local::basic_endpoint< Protocol >::protocol_type

The protocol type associated with the endpoint.

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

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


Constructor & Destructor Documentation

template<typename Protocol>
asio::local::basic_endpoint< Protocol >::basic_endpoint (  )  [inline]

Default constructor.

template<typename Protocol>
asio::local::basic_endpoint< Protocol >::basic_endpoint ( const char *  path  )  [inline]

Construct an endpoint using the specified path name.

template<typename Protocol>
asio::local::basic_endpoint< Protocol >::basic_endpoint ( const std::string &  path  )  [inline]

Construct an endpoint using the specified path name.

template<typename Protocol>
asio::local::basic_endpoint< Protocol >::basic_endpoint ( const basic_endpoint< Protocol > &  other  )  [inline]

Copy constructor.


Member Function Documentation

template<typename Protocol>
basic_endpoint& asio::local::basic_endpoint< Protocol >::operator= ( const basic_endpoint< Protocol > &  other  )  [inline]

Assign from another endpoint.

template<typename Protocol>
protocol_type asio::local::basic_endpoint< Protocol >::protocol (  )  const [inline]

The protocol associated with the endpoint.

template<typename Protocol>
data_type* asio::local::basic_endpoint< Protocol >::data (  )  [inline]

Get the underlying endpoint in the native type.

template<typename Protocol>
const data_type* asio::local::basic_endpoint< Protocol >::data (  )  const [inline]

Get the underlying endpoint in the native type.

template<typename Protocol>
std::size_t asio::local::basic_endpoint< Protocol >::size (  )  const [inline]

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

template<typename Protocol>
void asio::local::basic_endpoint< Protocol >::resize ( std::size_t  size  )  [inline]

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

template<typename Protocol>
std::size_t asio::local::basic_endpoint< Protocol >::capacity (  )  const [inline]

Get the capacity of the endpoint in the native type.

template<typename Protocol>
std::string asio::local::basic_endpoint< Protocol >::path (  )  const [inline]

Get the path associated with the endpoint.

template<typename Protocol>
void asio::local::basic_endpoint< Protocol >::path ( const char *  p  )  [inline]

Set the path associated with the endpoint.

template<typename Protocol>
void asio::local::basic_endpoint< Protocol >::path ( const std::string &  p  )  [inline]

Set the path associated with the endpoint.

template<typename Protocol>
void asio::local::basic_endpoint< Protocol >::init ( const char *  path,
std::size_t  path_length 
) [inline, private]


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 equality.

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 Elem, typename Traits, typename Protocol>
std::basic_ostream< Elem, Traits > & operator<< ( std::basic_ostream< Elem, Traits > &  os,
const basic_endpoint< Protocol > &  endpoint 
) [related]

Output an endpoint as a string.

Used to output a human-readable string for a specified endpoint.

Parameters:
os The output stream to which the string will be written.
endpoint The endpoint to be written.
Returns:
The output stream.


Member Data Documentation

template<typename Protocol>
union asio::local::basic_endpoint::data_union asio::local::basic_endpoint< Protocol >::data_ [private]

template<typename Protocol>
std::size_t asio::local::basic_endpoint< Protocol >::path_length_ [private]


The documentation for this class was generated from the following file:
Generated on Fri Jul 30 03:00:10 2010 for rphp by  doxygen 1.5.4