Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorChannel::StreamReader Class Reference

The reading end of one channel of a stream. More...

#include <PhosphorChannel/Stream.h>

Public Member Functions

 StreamReader (const StreamReader &)=delete
StreamReader & operator= (const StreamReader &)=delete
std::uint32_t id () const
const std::string & codec () const
ReadResult read (std::string &frame)
 The next complete frame, without waiting.

Detailed Description

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.

Constructor & Destructor Documentation

◆ StreamReader()

PhosphorChannel::StreamReader::StreamReader ( const StreamReader & )
delete

Member Function Documentation

◆ codec()

const std::string & PhosphorChannel::StreamReader::codec ( ) const
inline

◆ id()

std::uint32_t PhosphorChannel::StreamReader::id ( ) const
inline

◆ operator=()

StreamReader & PhosphorChannel::StreamReader::operator= ( const StreamReader & )
delete

◆ 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