Pigweed
C/C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
pw::channel::StreamChannel Class Referencefinal
Inheritance diagram for pw::channel::StreamChannel:
pw::channel::Implement< channel::ByteReaderWriter >

Public Member Functions

 StreamChannel (stream::Reader &reader, const thread::Options &read_thread_options, multibuf::MultiBufAllocator &read_allocator, stream::Writer &writer, const thread::Options &write_thread_option, multibuf::MultiBufAllocator &write_allocator)
 
 StreamChannel (multibuf::MultiBufAllocator &allocator, stream::Reader &reader, const thread::Options &read_thread_options, stream::Writer &writer, const thread::Options &write_thread_options)
 
 StreamChannel (const StreamChannel &)=delete
 
StreamChanneloperator= (const StreamChannel &)=delete
 
 StreamChannel (StreamChannel &&)=delete
 
StreamChanneloperator= (StreamChannel &&)=delete
 

Friends

class pw::NoDestructor< StreamChannel >
 

Detailed Description

A channel which delegates to an underlying reader and writer stream.

NOTE: this channel as well as its reader and writer must all continue to exist for the duration of the program, as they are referenced by other threads.

This unfortunate requirement is due to the fact that Stream::Read and Stream::Write are blocking. The stream reading and writing threaads may be blocked on Read or Write calls, and therefore cannot cleanly be shutdown.


The documentation for this class was generated from the following file: