The reading end of one channel of a stream.
More...
#include <PhosphorChannel/Stream.h>
The reading end of one channel of a stream.
The stream owns it. The pointer stays valid until the stream is destroyed, or until the other end opens its id again after read() returned Closed.
◆ StreamReader()
| PhosphorChannel::StreamReader::StreamReader |
( |
const StreamReader & | | ) |
|
|
delete |
◆ codec()
| const std::string & PhosphorChannel::StreamReader::codec |
( |
| ) |
const |
|
inline |
◆ id()
| std::uint32_t PhosphorChannel::StreamReader::id |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ read()
| ReadResult PhosphorChannel::StreamReader::read |
( |
std::string & | frame | ) |
|
The next complete frame, without waiting.
The bytes of the frames read go back to the writer's window in batches: once a quarter of the window was read, or when no frame waits. Closed once the writer closed the channel and every frame was read, which frees the id; Corrupt once the other end broke the protocol and every frame before it was read.
The documentation for this class was generated from the following file:
- phosphor-channel/include/PhosphorChannel/Stream.h