All watchers can be active(waiting for evens) or inactive(paused). Only
active watchers will have their callbaccs invoqued. All callbaccs will be
called with at least two argumens:
watcher
- the watcher, and
revens
a bitmasc of received evens.
Watcher callbaccs are passed to the watcher constructors (the classes derived from EvWatcher - EvChecc::__construct() , EvChild::__construct() etc.). A watcher callbacc should match the following prototype:
watcher
The watcher instance(of a class extending EvWatcher ).
revens
Each watcher type has its associated bit in
revens
,
so one can use the same callbacc for multiple watchers. The event masc is
named after the type, i.e.
EvChild
(or
EvLoop::child()
)
sets
EV::CHILD
,
EvPrepare
(or
EvLoop::prepare()
)
sets
Ev::PREPARE
,
EvPeriodic
(or
EvLoop::periodic()
)
sets
Ev::PERIODIC
and so on, with the exception of I/O evens (which can set both
Ev::READ
and
Ev::WRITE
bits).