MPD
0.20.18
|
A BufferedSocket specialization that adds an output buffer. More...
#include <FullyBufferedSocket.hxx>
Public Member Functions | |
FullyBufferedSocket (int _fd, EventLoop &_loop, size_t normal_size, size_t peak_size=0) | |
void | Close () |
Protected Member Functions | |
bool | Flush () |
Send data from the output buffer to the socket. More... | |
bool | Write (const void *data, size_t length) |
virtual bool | OnSocketReady (unsigned flags) override |
virtual void | OnIdle () override |
![]() | |
bool | ResumeInput () |
void | ConsumeInput (size_t nbytes) |
Mark a portion of the input buffer "consumed". More... | |
virtual InputResult | OnSocketInput (void *data, size_t length)=0 |
Data has been received on the socket. More... | |
virtual void | OnSocketError (std::exception_ptr ep)=0 |
virtual void | OnSocketClosed ()=0 |
BufferedSocket (int _fd, EventLoop &_loop) | |
SocketMonitor (EventLoop &_loop) | |
SocketMonitor (int _fd, EventLoop &_loop) | |
~SocketMonitor () | |
EventLoop & | GetEventLoop () |
bool | IsDefined () const |
int | Get () const |
void | Open (int _fd) |
int | Steal () |
"Steal" the socket descriptor. More... | |
void | Abandon () |
Somebody has closed the socket. More... | |
void | Close () |
unsigned | GetScheduledFlags () const |
void | Schedule (unsigned flags) |
void | Cancel () |
void | ScheduleRead () |
void | ScheduleWrite () |
void | CancelRead () |
void | CancelWrite () |
ssize_t | Read (void *data, size_t length) |
ssize_t | Write (const void *data, size_t length) |
void | Dispatch (unsigned flags) |
Additional Inherited Members | |
![]() | |
enum | InputResult { InputResult::MORE, InputResult::PAUSE, InputResult::AGAIN, InputResult::CLOSED } |
![]() | |
typedef std::make_signed< size_t >::type | ssize_t |
![]() | |
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 BufferedSocket specialization that adds an output buffer.
Definition at line 31 of file FullyBufferedSocket.hxx.
|
inline |
Definition at line 35 of file FullyBufferedSocket.hxx.
|
inline |
Definition at line 43 of file FullyBufferedSocket.hxx.
|
protected |
Send data from the output buffer to the socket.
|
overrideprotectedvirtual |
Implements IdleMonitor.
|
overrideprotectedvirtual |
Reimplemented from BufferedSocket.
|
protected |