scalestack::network::stream Class Reference
#include <stream.h>
Detailed Description
This is the base class for classes using streams.
Definition at line 46 of file stream.h.
Constructor & Destructor Documentation
| scalestack::network::stream::stream |
( |
kernel::module & |
module |
) |
[inline] |
| scalestack::network::stream::~stream |
( |
|
) |
[inline, virtual] |
| scalestack::network::stream::stream |
( |
const stream & |
|
) |
[private] |
Don't allow copying of objects.
Member Function Documentation
| void scalestack::network::stream::shutdown |
( |
void |
|
) |
[inline, virtual] |
| void scalestack::network::stream::stop |
( |
void |
|
) |
[inline] |
| void scalestack::network::stream::set_timer |
( |
uint64_t |
milliseconds |
) |
[inline] |
| void scalestack::network::stream::timer_expired |
( |
void |
|
) |
[inline, virtual] |
| void scalestack::network::stream::run_now |
( |
void |
|
) |
[inline] |
| void scalestack::network::stream::run |
( |
void |
|
) |
[inline, virtual] |
| void scalestack::network::stream::connected |
( |
void |
|
) |
[inline, virtual] |
| void scalestack::network::stream::reconnect |
( |
void |
|
) |
[inline] |
Reconnect using the set address list when this was not a stream accepted from a listening connection.
Definition at line 386 of file stream.h.
| virtual size_t scalestack::network::stream::read |
( |
uint8_t * |
buffer, |
|
|
size_t |
size | |
|
) |
| | [pure virtual] |
| void scalestack::network::stream::consume |
( |
size_t |
size |
) |
[inline] |
Notify the connection that more data from the read buffer has been consumed. This is required after a read() call was not able to consume all the data. This can be called at a later time to remove the data from the read buffer, such as in flush_write(). If the read buffer was previously full the connection will start watching for new data.
- Parameters:
-
| [in] | size | The amount of data to consume. |
Definition at line 391 of file stream.h.
| void scalestack::network::stream::read_eof |
( |
void |
|
) |
[inline, virtual] |
| size_t scalestack::network::stream::write |
( |
uint8_t * |
buffer, |
|
|
size_t |
size, |
|
|
bool |
flush = false | |
|
) |
| | [inline] |
Write data to the connection. By default this is buffered and not flushed, but it will be flushed if the buffer becomes full. If the buffer being written is large enough, it will be written directly to the connection without being buffered. If this method is not able to write or buffer all data, the connection will return with the partial amount and call flush_write() when it is ready again.
- Parameters:
-
| [in] | buffer | Buffer to write. |
| [in] | size | Size of buffer. |
| [in] | flush | Whether to flush data immediately or not. |
- Returns:
- Amount of data written or buffered.
Definition at line 401 of file stream.h.
| virtual void scalestack::network::stream::flush_write |
( |
void |
|
) |
[pure virtual] |
| void scalestack::network::stream::shutdown_write |
( |
void |
|
) |
[inline] |
Shutdown the write end of the socket.
Definition at line 406 of file stream.h.
| stream& scalestack::network::stream::operator= |
( |
const stream & |
|
) |
[private] |
Don't allow assignment of objects.
Friends And Related Function Documentation
Field Documentation
The documentation for this class was generated from the following file: