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.
◆ InputResult
| 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::BufferedSocket |
( |
int |
_fd, |
|
|
EventLoop & |
_loop |
|
) |
| |
|
inline |
◆ Close()
| void SocketMonitor::Close |
◆ ConsumeInput()
| void BufferedSocket::ConsumeInput |
( |
size_t |
nbytes | ) |
|
|
inlineprotected |
◆ IsDefined()
| bool SocketMonitor::IsDefined |
|
inline |
◆ OnSocketClosed()
| virtual void BufferedSocket::OnSocketClosed |
( |
| ) |
|
|
protectedpure virtual |
◆ OnSocketError()
| virtual void BufferedSocket::OnSocketError |
( |
std::exception_ptr |
ep | ) |
|
|
protectedpure virtual |
◆ OnSocketInput()
| 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.
◆ OnSocketReady()
| virtual bool BufferedSocket::OnSocketReady |
( |
unsigned |
flags | ) |
|
|
overrideprotectedvirtual |
◆ ResumeInput()
| bool BufferedSocket::ResumeInput |
( |
| ) |
|
|
protected |
- Returns
- false if the socket has been closed
◆ Write()
The documentation for this class was generated from the following file: