Describes an endpoint for a UNIX socket. More...
#include <basic_endpoint.hpp>
Classes | |
union | data_union |
Public Types | |
typedef asio::detail::socket_addr_type | data_type |
typedef Protocol | protocol_type |
The protocol type associated with the endpoint. | |
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. | |
std::size_t | capacity () const |
Get the capacity of the endpoint in the native type. | |
data_type * | data () |
Get the underlying endpoint in the native type. | |
const data_type * | data () const |
Get the underlying endpoint in the native type. | |
basic_endpoint & | operator= (const basic_endpoint &other) |
Assign from another endpoint. | |
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. | |
protocol_type | protocol () const |
The protocol associated with the endpoint. | |
void | resize (std::size_t size) |
Set the underlying size of the endpoint in the native type. | |
std::size_t | size () const |
Get the underlying size of the endpoint in the native type. | |
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 inequality. | |
bool | operator< (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2) |
Compare endpoints for ordering. | |
bool | operator== (const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2) |
Compare two endpoints for equality. | |
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. |
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.
Definition at line 60 of file local/basic_endpoint.hpp.
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.
Definition at line 71 of file local/basic_endpoint.hpp.
typedef Protocol asio::local::basic_endpoint< Protocol >::protocol_type |
The protocol type associated with the endpoint.
Definition at line 64 of file local/basic_endpoint.hpp.
asio::local::basic_endpoint< Protocol >::basic_endpoint | ( | ) | [inline] |
Default constructor.
Definition at line 75 of file local/basic_endpoint.hpp.
asio::local::basic_endpoint< Protocol >::basic_endpoint | ( | const char * | path | ) | [inline] |
Construct an endpoint using the specified path name.
Definition at line 81 of file local/basic_endpoint.hpp.
asio::local::basic_endpoint< Protocol >::basic_endpoint | ( | const std::string & | path | ) | [inline] |
Construct an endpoint using the specified path name.
Definition at line 88 of file local/basic_endpoint.hpp.
asio::local::basic_endpoint< Protocol >::basic_endpoint | ( | const basic_endpoint< Protocol > & | other | ) | [inline] |
Copy constructor.
Definition at line 94 of file local/basic_endpoint.hpp.
std::size_t asio::local::basic_endpoint< Protocol >::capacity | ( | ) | const [inline] |
Get the capacity of the endpoint in the native type.
Definition at line 157 of file local/basic_endpoint.hpp.
data_type* asio::local::basic_endpoint< Protocol >::data | ( | ) | [inline] |
Get the underlying endpoint in the native type.
Definition at line 115 of file local/basic_endpoint.hpp.
const data_type* asio::local::basic_endpoint< Protocol >::data | ( | ) | const [inline] |
Get the underlying endpoint in the native type.
Definition at line 121 of file local/basic_endpoint.hpp.
void asio::local::basic_endpoint< Protocol >::init | ( | const char * | path, |
std::size_t | path_length | ||
) | [inline, private] |
Definition at line 214 of file local/basic_endpoint.hpp.
basic_endpoint& asio::local::basic_endpoint< Protocol >::operator= | ( | const basic_endpoint< Protocol > & | other | ) | [inline] |
Assign from another endpoint.
Definition at line 101 of file local/basic_endpoint.hpp.
std::string asio::local::basic_endpoint< Protocol >::path | ( | ) | const [inline] |
Get the path associated with the endpoint.
Definition at line 163 of file local/basic_endpoint.hpp.
void asio::local::basic_endpoint< Protocol >::path | ( | const char * | p | ) | [inline] |
Set the path associated with the endpoint.
Definition at line 169 of file local/basic_endpoint.hpp.
void asio::local::basic_endpoint< Protocol >::path | ( | const std::string & | p | ) | [inline] |
Set the path associated with the endpoint.
Definition at line 176 of file local/basic_endpoint.hpp.
protocol_type asio::local::basic_endpoint< Protocol >::protocol | ( | ) | const [inline] |
The protocol associated with the endpoint.
Definition at line 109 of file local/basic_endpoint.hpp.
void asio::local::basic_endpoint< Protocol >::resize | ( | std::size_t | size | ) | [inline] |
Set the underlying size of the endpoint in the native type.
Definition at line 134 of file local/basic_endpoint.hpp.
std::size_t asio::local::basic_endpoint< Protocol >::size | ( | ) | const [inline] |
Get the underlying size of the endpoint in the native type.
Definition at line 127 of file local/basic_endpoint.hpp.
bool operator!= | ( | const basic_endpoint< Protocol > & | e1, |
const basic_endpoint< Protocol > & | e2 | ||
) | [friend] |
Compare two endpoints for inequality.
Definition at line 189 of file local/basic_endpoint.hpp.
bool operator< | ( | const basic_endpoint< Protocol > & | e1, |
const basic_endpoint< Protocol > & | e2 | ||
) | [friend] |
Compare endpoints for ordering.
Definition at line 196 of file local/basic_endpoint.hpp.
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.
os | The output stream to which the string will be written. |
endpoint | The endpoint to be written. |
Definition at line 249 of file local/basic_endpoint.hpp.
bool operator== | ( | const basic_endpoint< Protocol > & | e1, |
const basic_endpoint< Protocol > & | e2 | ||
) | [friend] |
Compare two endpoints for equality.
Definition at line 182 of file local/basic_endpoint.hpp.
union asio::local::basic_endpoint::data_union asio::local::basic_endpoint< Protocol >::data_ [private] |
std::size_t asio::local::basic_endpoint< Protocol >::path_length_ [private] |
Definition at line 211 of file local/basic_endpoint.hpp.