aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/tee.cpp
blob: d059c367d01e5f3ae44bf135500b7d38d7df07ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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();
}