CppCMS
Public Types | Public Member Functions
booster::aio::endpoint Class Reference

this class represents the connection endpoint, that is generally sockaddr structure in Berkeley sockets API. More...

#include <booster/booster/aio/endpoint.h>

List of all members.

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

Detailed Description

this class represents the connection endpoint, that is generally sockaddr structure in Berkeley sockets API.


Member Typedef Documentation

typedef std::pair<sockaddr const *,int> booster::aio::endpoint::native_address_type

The native sockaddr structure and its size type


Constructor & Destructor Documentation

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


Member Function Documentation

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

Set a port

Throws system::system_error if the port is invalid

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


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