CppCMS
|
This namespace povides and API to asynchronous sockets API, asynchronous timer and event loop handing. More...
Namespaces | |
aio_error | |
This namespace includes Booster.Aio specific error codes. | |
Classes | |
class | acceptor |
this class represents a socket that accepts incoming connections More... | |
class | basic_io_device |
This is a basic object that allows execution of asynchronous operations. More... | |
class | basic_socket |
This class represents a basic Socket object. More... | |
class | buffer_impl |
This is a base class that represents a buffer - a set of contiguous chunks of memory that can be transfered over network. More... | |
class | const_buffer |
An immutable buffer - buffer for write operations. More... | |
class | deadline_timer |
A timer object. More... | |
class | endpoint |
this class represents the connection endpoint, that is generally sockaddr structure in Berkeley sockets API. More... | |
struct | io_events |
the struct that collects multiple event types for polling. More... | |
class | io_service |
this is the central event loop that dispatches all requests. More... | |
class | mutable_buffer |
A mutable buffer - a buffer for read operations. More... | |
class | reactor |
This class is an abstraction of platform dependent polling API. More... | |
class | stream_socket |
This object represents a stream socket: TCP/IP IPv4 or IPv6 or Unix domain stream socket. More... | |
Typedefs | |
typedef unspecified | native_type |
typedef callback< void(system::error_code const &)> | event_handler |
typedef callback< void()> | handler |
typedef callback< void(system::error_code const &, size_t)> | io_handler |
Enumerations | |
enum | family_type { pf_unix, pf_inet, pf_inet6 } |
enum | socket_type { sock_stream, sock_datagram } |
Functions | |
const_buffer | buffer (void const *p, size_t n) |
mutable_buffer | buffer (void *p, size_t n) |
const_buffer | buffer (std::vector< char > const &d) |
mutable_buffer | buffer (std::vector< char > &d) |
const_buffer | buffer (std::string const &d) |
const_buffer | operator+ (const_buffer const &buf, size_t n) |
mutable_buffer | operator+ (mutable_buffer const &buf, size_t n) |
const_buffer & | operator+= (const_buffer &buf, size_t n) |
mutable_buffer & | operator+= (mutable_buffer &buf, size_t n) |
const_buffer | operator+ (const_buffer const &b1, const_buffer const &b2) |
const_buffer & | operator+= (const_buffer &b1, const_buffer const &b2) |
mutable_buffer | operator+ (mutable_buffer const &b1, mutable_buffer const &b2) |
mutable_buffer & | operator+= (mutable_buffer &b1, mutable_buffer const &b2) |
BOOSTER_API void | socket_pair (stream_socket &s1, stream_socket &s2, system::error_code &e) |
BOOSTER_API void | socket_pair (stream_socket &s1, stream_socket &s2) |
Variables | |
static BOOSTER_UNUSED aio_error::category const & | aio_error_cat = aio_error::get_category() |
static const native_type | invalid_socket = unspecified |
This namespace povides and API to asynchronous sockets API, asynchronous timer and event loop handing.
typedef callback<void(system::error_code const &)> booster::aio::event_handler |
Completion callback - the callback that receives an operation completion result - error_code.
typedef callback<void()> booster::aio::handler |
General job handler - the operation that should be executed
typedef callback<void(system::error_code const &,size_t)> booster::aio::io_handler |
IO completion callback - the callback that receives an operation completion result - error_code and the amount of bytes transferred
typedef unspecified booster::aio::native_type |
Native socket type. int on POSIX platforms and unsigned on Windows.
Socket family type
Socket protocol type
|
inline |
Create a buffer from POD object of size n
References booster::aio::buffer_impl< Pointer >::add().
Referenced by buffer().
|
inline |
Create a buffer from POD object of size n
References booster::aio::buffer_impl< Pointer >::add().
|
inline |
Create a buffer from std::vector<char>
References buffer().
|
inline |
Create a buffer from std::vector<char>
References buffer().
|
inline |
Create a buffer from std::string
References booster::aio::buffer_impl< Pointer >::add(), buffer(), and booster::aio::buffer_impl< Pointer >::get().
|
inline |
Create a new buffer by "consuming" n bytes. For example if the buffer has 100 bytes then adding 50 to it would create a buffer with remaining 50 bytes
|
inline |
Create a new buffer by "consuming" n bytes. For example if the buffer has 100 bytes then adding 50 to it would create a buffer with remaining 50 bytes
|
inline |
Append two buffers
|
inline |
Append two buffers
|
inline |
Consume n bytes from the buffer.
|
inline |
Consume n bytes from the buffer.
|
inline |
Append one buffer to another
|
inline |
Append one buffer to another
BOOSTER_API void booster::aio::socket_pair | ( | stream_socket & | s1, |
stream_socket & | s2, | ||
system::error_code & | e | ||
) |
Create a connected pair of stream sockets, under UNIX creates unix-domain-sockets under windows AF_INET sockets
BOOSTER_API void booster::aio::socket_pair | ( | stream_socket & | s1, |
stream_socket & | s2 | ||
) |
Create a connected pair of stream sockets, under UNIX creates unix-domain-sockets under windows AF_INET sockets, throws booster::system_error on error
|
static |
aio category object reference
|
static |
Invalid value for a socket native type