16 {
18
21 pipeSink.setOnData([&pipeSource](const char* chunk, std::size_t chunkLen) {
22 const std::string string(chunk, chunkLen);
23 VLOG(1) << "Pipe Data: " << string;
24 pipeSource.send(chunk, chunkLen);
25
26
27 });
28
29 pipeSink.setOnEof([]() {
30 VLOG(1) << "Pipe EOF";
31 });
32
33 pipeSink.setOnError([]([[maybe_unused]] int errnum) {
34 VLOG(1) << "PipeSink";
35 });
36
37 pipeSource.setOnError([]([[maybe_unused]] int errnum) {
38 VLOG(1) << "PipeSource";
39 });
40
41 pipeSource.send("Hello World!");
42 },
43 []([[maybe_unused]] int errnum) {
44 PLOG(ERROR) << "Pipe not created";
45 });
46
48}
static void init(int argc, char *argv[])
static int start(const utils::Timeval &timeOut={LONG_MAX, 0})