[private], tcp_acceptor< T, Arg > [private], and term_handler [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 (io_event_loop &_loop) |
| Attaches the handler to an event loop. | |
| io_event_loop * | 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 | |
| io_handler (iohandle ioh=iohandle()) | |
| Constructor. | |
| io_handler (io_event_loop &loop, iohandle ioh=iohandle(), bool owned=false) | |
| Constructor. | |
| virtual | ~io_handler () |
| 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 | io_event_loop |
|
|
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).
|
|
|
|