2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20#include "core/pipe/PipeSink.h"
22#ifndef DOXYGEN_SHOULD_SKIP_THIS
24#include "core/system/unistd.h"
25#include "utils/Timeval.h"
32#ifndef MAX_READ_JUNKSIZE
33#define MAX_READ_JUNKSIZE 16384
57 onData(chunk,
static_cast<std::size_t>(ret));
75 this->onData = onData;
83 this->onError = onError;
#define MAX_READ_JUNKSIZE
int getRegisteredFd() const
void readEvent() override
void setOnError(const std::function< void(int)> &onError)
void setOnEof(const std::function< void()> &onEof)
void setOnData(const std::function< void(const char *, std::size_t)> &onData)
void unobservedEvent() override
ssize_t read(int fd, void *buf, std::size_t count)