FileHandle based I/O read/write event. More...
#include <senf/PPI/IOEvent.hh>
Classes | |
struct | ErrorException |
Unhandled error condition. More... | |
struct | HangupException |
Unhandled hangup condition. More... | |
Public Types | |
enum | EventFlags { Read = scheduler::FdEvent::EV_READ, Prio = scheduler::FdEvent::EV_PRIO, Write = scheduler::FdEvent::EV_WRITE, Hup = scheduler::FdEvent::EV_HUP, Err = scheduler::FdEvent::EV_ERR } |
Public Types inherited from senf::ppi::EventImplementation< IOEventInfo > | |
typedef IOEventInfo | Event |
typedef detail::EventArgType< IOEventInfo >::type | EventArg |
Public Member Functions | |
template<class Handle > | |
void | set (Handle handle, unsigned events) |
Public Member Functions inherited from senf::ppi::EventImplementation< IOEventInfo > | |
module::Module & | module () const |
Module in which the event is registered. More... | |
EventManager & | manager () const |
EventManager of the event. More... | |
Public Member Functions inherited from senf::ppi::EventDescriptor | |
virtual | ~EventDescriptor () |
bool | enabled () const |
Check, whether the event is currently enabled. More... | |
void | enabled (bool v) |
Enable or disable the event. More... | |
Structors and default members | |
IOEvent () | |
template<class Handle > | |
IOEvent (Handle handle, unsigned events) | |
Additional Inherited Members | |
Protected Types inherited from senf::ppi::EventImplementationHelper< EventType, Self > | |
typedef detail::EventArgType< EventType >::type | EventArg |
Protected Member Functions inherited from senf::ppi::EventImplementation< IOEventInfo > | |
EventImplementation () | |
Protected Member Functions inherited from senf::ppi::EventDescriptor | |
EventDescriptor () | |
Protected Member Functions inherited from senf::ppi::EventImplementationHelper< EventType, Self > | |
void | callback (EventArg event, ClockService::clock_type time) |
Forward event to user callback. More... | |
void | callback (EventArg event) |
Forward event to user callback. More... | |
FileHandle based I/O read/write event.
An IOEvent is signaled, whenever the FileHandle handle becomes readable or writable. The type of event is specified using the events mask with values from EventFlags.
There are two types of flags:
Definition at line 61 of file IOEvent.hh.
Enumerator | |
---|---|
Read | FileHandle is readable |
Prio | FileHandle priority data is readable |
Write | FileHandle is writable |
Hup | Hangup condition on FileHandle |
Err | Some other error condition on FileHandle |
Definition at line 71 of file IOEvent.hh.
senf::ppi::IOEvent::IOEvent | ( | ) |
senf::ppi::IOEvent::IOEvent | ( | Handle | handle, |
unsigned | events | ||
) |
void senf::ppi::IOEvent::set | ( | Handle | handle, |
unsigned | events | ||
) |