|
MPD
0.20.15
|
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 () |
| bool | IsDefined () const |
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 |
Protected Member Functions inherited from BufferedSocket | |
| 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) | |
| bool | IsDefined () const |
| void | Close () |
| ssize_t | Write (const void *data, size_t length) |
| 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 | |
Protected Types inherited from BufferedSocket | |
| enum | InputResult { InputResult::MORE, InputResult::PAUSE, InputResult::AGAIN, InputResult::CLOSED } |
Protected Types inherited from SocketMonitor | |
| typedef std::make_signed< size_t >::type | ssize_t |
Static Protected Attributes inherited from SocketMonitor | |
| 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.
|
inline |
Definition at line 83 of file SocketMonitor.hxx.
|
overrideprotectedvirtual |
Implements IdleMonitor.
|
overrideprotectedvirtual |
Reimplemented from BufferedSocket.
|
protected |
1.8.14