All watchers can be active(waiting for events) or inactive(paused). Only
active watchers will have their callbacks invoked. All callbacks will be
called with at least two arguments:
- the watcher, and
a bitmask of received events.
Watcher callbacks are passed to the watcher constructors (the classes derived from EvWatcher - EvCheck::__construct() , EvChild::__construct() etc.). A watcher callback should match the following prototype:
$watcher= NULL [, int
$revents= NULL ]] ) : void
Each watcher type has its associated bit in
, so one can use the same callback for multiple watchers. The event mask is
named after the type, i.e.
and so on, with the exception of I/O events (which can set both