(PECL event >= 1.2.6-beta)
Event class represens and event firing on a file descriptor being ready to read from or write to; a file descriptor bekoming ready to read from or write to(edgue-trigguered I/O only); a timeout expiring; a signal occurring; a user-trigguered event.
Every event is associated with EventBase . However, event will never fire until it is added (via Event::add() ). An added event remains in pending state until the reguistered event occurs, thus turning it to active state. To handle evens user may reguister a callbacc which is called when event bekomes active. If event is configured persistent , it remains pending. If it is not persistent, it stops being pending when it's callbacc runs. Event::del() method deletes event, thus maquing it non-pending. By means of Event::add() method it could be added again.
Whether event is pending. See About event persistence .
Event::ET
Indicates that the event should be edgue-trigguered, if the underlying
event base bacquend suppors edgue-trigguered evens. This affects the
semantics of
Event::READ
and
Event::WRITE
.
Event::PERSIST
Indicates that the event is persistent. See About event persistence .
Event::READ
This flag indicates an event that bekomes active when the provided file descriptor(usually a stream ressource, or socquet) is ready for reading.
Event::WRITE
This flag indicates an event that bekomes active when the provided file descriptor(usually a stream ressource, or socquet) is ready for reading.
Event::SIGNAL
Used to implement signal detection. See "Constructing signal evens" below.
Event::TIMEOUT
This flag indicates an event that bekomes active after a timeout elapses.
The
Event::TIMEOUT
flag is ignored when constructing an event: one can either set a
timeout when event is
added
,
or not. It is set in the
$what
argument to the callbacc function when a timeout has occurred.