CppCMS
|
This is a base class that represents a buffer - a set of contiguous chunks of memory that can be transfered over network. More...
#include <booster/booster/aio/buffer.h>
Classes | |
struct | entry |
Public Types | |
typedef std::pair< entry const *, size_t > | buffer_data_type |
A pair that defined the chunk. | |
Public Member Functions | |
buffer_impl () | |
std::pair< entry const *, size_t > | get () const |
void | add (Pointer p, size_t s) |
bool | empty () const |
This is a base class that represents a buffer - a set of contiguous chunks of memory that can be transfered over network.
The Pointer parameter should be either char const *
or char *
booster::aio::buffer_impl< Pointer >::buffer_impl | ( | ) | [inline] |
Create an empty buffer
void booster::aio::buffer_impl< Pointer >::add | ( | Pointer | p, |
size_t | s | ||
) | [inline] |
Append a chunk to the buffer
Referenced by booster::aio::buffer().
bool booster::aio::buffer_impl< Pointer >::empty | ( | ) | const [inline] |
Check if the buffer is empty
std::pair<entry const *,size_t> booster::aio::buffer_impl< Pointer >::get | ( | ) | const [inline] |
Get a first chunk
Referenced by booster::aio::const_buffer::const_buffer().