CppCMS
|
this class represents the connection endpoint, that is generally sockaddr structure in Berkeley sockets API. More...
#include <booster/booster/aio/endpoint.h>
Public Types | |
typedef std::pair< sockaddr const *, int > | native_address_type |
Public Member Functions | |
endpoint (endpoint const &) | |
endpoint const & | operator= (endpoint const &) |
endpoint (std::string const &ip, int port) | |
void | ip (std::string const &) |
void | port (int) |
std::string | ip () const |
int | port () const |
endpoint (std::string const &) | |
void | path (std::string const &) |
std::string | path () const |
family_type | family () const |
void | raw (sockaddr const *p, int size) |
native_address_type | raw () const |
this class represents the connection endpoint, that is generally sockaddr structure in Berkeley sockets API.
typedef std::pair<sockaddr const *,int> booster::aio::endpoint::native_address_type |
The native sockaddr structure and its size type
booster::aio::endpoint::endpoint | ( | std::string const & | ip, |
int | port | ||
) |
Create a new IP endpoint using ip address and port
Throws system::system_error if the port or the address are invalid or not supported
booster::aio::endpoint::endpoint | ( | std::string const & | ) |
Create a Unix domain socket endpoint,
Throws system::system_error if the path is not valid Unix domain socket path
family_type booster::aio::endpoint::family | ( | ) | const |
Get the endpoint family
Throws system::system_error if it is not assigned or the endpoint family is not supported
void booster::aio::endpoint::ip | ( | std::string const & | ) |
Set an IP address
Throws system::system_error if the address is invalid or not supported
std::string booster::aio::endpoint::ip | ( | ) | const |
Get an ip
Throws system::system_error if the endpoint is not assigned or does not belong to IP protocol
void booster::aio::endpoint::path | ( | std::string const & | ) |
Define a endpoint as a Unix domain socket endpoint
Throws system::system_error if the path is not valid Unix domain socket path
std::string booster::aio::endpoint::path | ( | ) | const |
Get a endpoint path.
Throws system::system_error if it is not assigned or the endpoint is not Unix domain socket endpoint
void booster::aio::endpoint::port | ( | int | ) |
Set a port
Throws system::system_error if the port is invalid
int booster::aio::endpoint::port | ( | ) | const |
Get a port
Throws system::system_error if the endpoint is not assigned or does not belong to IP protocol
void booster::aio::endpoint::raw | ( | sockaddr const * | p, |
int | size | ||
) |
Set the native sockaddr structure as endpoint of size size
Get the native endpoint data structure