[private]
, TCPAcceptor< T, Arg > [private]
, and TermHandler [private]
.
The subclass may call want_read(bool) to enable/disable read events, and want_write(bool) to enable/disable write events.
Handlers are only active when attached to both an event loop (via the constructor or set_loop) and a file descriptor (via the constructor or set_ioh()).
Public Methods | |
void | set_loop (IOEventLoop &_loop) |
Attaches the handler to an event loop. | |
IOEventLoop * | get_loop () |
Returns the event loop to which the handler is attached. | |
bool | is_owned () |
Should this handler refrain from deleting itself on connection close? | |
void | set_owned (bool o) |
Should this handler refrain from deleting itself on connection close? | |
IOHandle | get_ioh () |
Returns the file descriptor to which the handler is attached. | |
Protected Methods | |
IOHandler (IOHandle ioh=IOHandle()) | |
Constructor. | |
IOHandler (IOEventLoop &loop, IOHandle ioh=IOHandle(), bool owned=false) | |
Constructor. | |
virtual | ~IOHandler () |
Destructor. | |
void | set_ioh (IOHandle ioh) |
Attaches the handler to a file descriptor. | |
virtual void | ravail () |
Called by the event loop when bytes are available on the file descriptor (if want_read(true) has been called). | |
virtual void | wavail () |
Called by the event loop when bytes may be written on the file descriptor (if want_write(true) has been called). | |
void | want_read (bool) |
Invoked by the subclass to signal interest in read availability. | |
void | want_write (bool) |
Invoked by the subclass to signal interest in write availability. | |
Friends | |
class | IOEventLoop |
|
Constructor.
|
|
Constructor.
|
|
Destructor.
|
|
Returns the file descriptor to which the handler is attached.
|
|
Returns the event loop to which the handler is attached.
|
|
Should this handler refrain from deleting itself on connection close?
|
|
Called by the event loop when bytes are available on the file descriptor (if want_read(true) has been called).
|
|
Attaches the handler to a file descriptor.
|
|
Attaches the handler to an event loop.
|
|
Should this handler refrain from deleting itself on connection close?
|
|
Invoked by the subclass to signal interest in read availability.
|
|
Invoked by the subclass to signal interest in write availability.
|
|
Called by the event loop when bytes may be written on the file descriptor (if want_write(true) has been called).
|
|
|