diff options
author | Devtools Arcadia <[email protected]> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <[email protected]> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /util/stream/tee.cpp |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'util/stream/tee.cpp')
-rw-r--r-- | util/stream/tee.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/util/stream/tee.cpp b/util/stream/tee.cpp new file mode 100644 index 00000000000..99873b95ba3 --- /dev/null +++ b/util/stream/tee.cpp @@ -0,0 +1,24 @@ +#include "tee.h" + +TTeeOutput::TTeeOutput(IOutputStream* l, IOutputStream* r) noexcept + : L_(l) + , R_(r) +{ +} + +TTeeOutput::~TTeeOutput() = default; + +void TTeeOutput::DoWrite(const void* buf, size_t len) { + L_->Write(buf, len); + R_->Write(buf, len); +} + +void TTeeOutput::DoFlush() { + L_->Flush(); + R_->Flush(); +} + +void TTeeOutput::DoFinish() { + L_->Finish(); + R_->Finish(); +} |