A SocketMonitor specialization that adds an input buffer.
More...
#include <BufferedSocket.hxx>
|
static constexpr unsigned | READ = PollGroup::READ |
|
static constexpr unsigned | WRITE = PollGroup::WRITE |
|
static constexpr unsigned | ERROR = PollGroup::ERROR |
|
static constexpr unsigned | HANGUP = PollGroup::HANGUP |
|
A SocketMonitor specialization that adds an input buffer.
Definition at line 37 of file BufferedSocket.hxx.
Enumerator |
---|
MORE |
The method was successful, and it is ready to read more data.
|
PAUSE |
The method does not want to get more data for now.
It will call ResumeInput() when it's ready for more.
|
AGAIN |
The method wants to be called again immediately, if there's more data in the buffer.
|
CLOSED |
The method has closed the socket.
|
Definition at line 78 of file BufferedSocket.hxx.
BufferedSocket::BufferedSocket |
( |
int |
_fd, |
|
|
EventLoop & |
_loop |
|
) |
| |
|
inline |
void BufferedSocket::ConsumeInput |
( |
size_t |
nbytes | ) |
|
|
inlineprotected |
virtual void BufferedSocket::OnSocketClosed |
( |
| ) |
|
|
protectedpure virtual |
virtual void BufferedSocket::OnSocketError |
( |
std::exception_ptr |
ep | ) |
|
|
protectedpure virtual |
virtual InputResult BufferedSocket::OnSocketInput |
( |
void * |
data, |
|
|
size_t |
length |
|
) |
| |
|
protectedpure virtual |
Data has been received on the socket.
- Parameters
-
data | a pointer to the beginning of the buffer; the buffer may be modified by the method while it processes the data |
Implemented in HttpdClient.
virtual bool BufferedSocket::OnSocketReady |
( |
unsigned |
flags | ) |
|
|
overrideprotectedvirtual |
bool BufferedSocket::ResumeInput |
( |
| ) |
|
|
protected |
- Returns
- false if the socket has been closed
The documentation for this class was generated from the following file: