#include <stream_channel.h>
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 | |
StreamChannel & | operator= (const StreamChannel &)=delete |
StreamChannel (StreamChannel &&)=delete | |
StreamChannel & | operator= (StreamChannel &&)=delete |
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.