EVWATCHER(3) 1 EVWATCHER(3)
The EvWatcher class
INTRODUCTION
EvWatcher is a base class for all watchers( EvCheck , EvChild etc.). Since EvWatcher 's constructor is abstract , one can't(and don't need
to) create EvWatcher objects directly.
CLASS SYNOPSIS
EvWatcher
abstract
EvWatcher
Properties
o public$is_active
o public$data
o public$is_pending
o public$priority
Methods
o public int EvWatcher::clear (void )
o abstractpublic EvWatcher::__construct (void )
o public void EvWatcher::feed (int $revents)
o public EvLoop EvWatcher::getLoop (void )
o public void EvWatcher::invoke (int $revents)
o public bool EvWatcher::keepalive ([bool $value])
o public void EvWatcher::setCallback (callable $callback)
o public void EvWatcher::start (void )
o public void EvWatcher::stop (void )
PROPERTIES
o $is_active
- Readonly . TRUE if the watcher is active. FALSE otherwise.
o $data
- User custom data associated with the watcher
o $is_pending
- Readonly . TRUE if the watcher is pending, i.e. it has outstanding events, but its callback has not yet been invoked. FALSE
otherwise. As long, as a watcher is pending(but not active), one must not change its priority.
o $priority
- Integer between Ev::MINPRI and Ev::MAXPRI . Pending watchers with higher priority will be invoked before watchers with lower
priority, but priority will not keep watchers from being executed(except for EvIdle watchers). EvIdle watchers provide functional-
ity to suppress invocation when higher priority events are pending.
PHP Documentation Group EVWATCHER(3)