|
C++ edjLibrary SDK
|
This class represents a write stream. More...
#include <stream.hpp>
Public Member Functions | |
| WriteStream () | |
| Constructs a new empty Write Stream object. More... | |
| WriteStream (uint32_t sd) | |
| Constructs a new initilized Write Stream object. More... | |
| edjx::error::StreamError | write_chunk (const std::string &text) |
| Write a chunk of text into the write stream. More... | |
| edjx::error::StreamError | write_chunk (const std::vector< uint8_t > &bytes) |
| Write a chunk of binary data into the write stream. More... | |
| edjx::error::StreamError | abort () |
| Aborts sending data and closes the stream. More... | |
Public Member Functions inherited from edjx::stream::BaseStream | |
| BaseStream () | |
| Constructs a new empty Base Stream object. More... | |
| BaseStream (uint32_t sd) | |
| Constructs a new initilized Base Stream object. More... | |
| uint32_t | get_sd () const |
| Get the stream descriptor of the stream. More... | |
| bool | is_initialized () const |
| Check whether the stream object has been initialized or not. More... | |
| edjx::error::StreamError | close () |
| Close the stream. More... | |
Additional Inherited Members | |
Protected Attributes inherited from edjx::stream::BaseStream | |
| uint32_t | sd |
| The stream descriptor. More... | |
| bool | initialized |
| True if the stream is initialized, false if it is closed. More... | |
This class represents a write stream.
|
inline |
Constructs a new empty Write Stream object.
|
inline |
Constructs a new initilized Write Stream object.
| sd | Stream descriptor |
| edjx::error::StreamError edjx::stream::WriteStream::abort | ( | ) |
Aborts sending data and closes the stream.
This method abruptly ends the streaming.
Difference between close() and abort():
Note that close() is not available after abort() is called.
| edjx::error::StreamError edjx::stream::WriteStream::write_chunk | ( | const std::string & | text | ) |
Write a chunk of text into the write stream.
| text | A chunk of text |
| edjx::error::StreamError edjx::stream::WriteStream::write_chunk | ( | const std::vector< uint8_t > & | bytes | ) |
Write a chunk of binary data into the write stream.
| bytes | A chunk of binary data |