#include <serialise.hh>
Public Member Functions | |
FramedSink (BufferedSink &to, std::function< void()> &&checkError) | |
void | writeUnbuffered (std::string_view data) override |
![]() | |
BufferedSink (size_t bufSize=32 *1024) | |
void | operator() (std::string_view data) override |
void | flush () |
![]() | |
virtual bool | good () |
Public Attributes | |
BufferedSink & | to |
std::function< void()> | checkError |
![]() | |
size_t | bufSize |
size_t | bufPos |
std::unique_ptr< char[]> | buffer |
Write as chunks in the format expected by FramedSource.
The checkError
function can be used to terminate the stream when you detect that an error has occurred. It does so by throwing an exception.
|
inlineoverridevirtual |
Implements nix::BufferedSink.