EventBase
final class EventBase (View source)
EventBase.
EventBase class represents libevent's event base structure. It holds a set of events and can poll to determine which events are active. Each event base has a method, or a backend that it uses to determine which events are ready. The recognized methods are: select, poll, epoll, kqueue, devpoll, evport and win32 . To configure event base to use, or avoid specific backend EventConfig class can be used.
Constants
LOOP_ONCE |
|
LOOP_NONBLOCK |
|
NOLOCK |
|
STARTUP_IOCP |
|
NO_CACHE_TIME |
|
EPOLL_USE_CHANGELIST |
|
IGNORE_ENV |
|
PRECISE_TIMER |
|
Methods
dispatch.
exit.
free.
getFeatures.
getMethod.
getTimeOfDayCached.
gotExit.
gotStop.
loop.
priorityInit.
reInit.
Tells event_base to resume previously stopped event
stop.
Updates cache time
Details
__construct(EventConfig|null $cfg = null)
__construct.
Constructs EventBase object.
void
dispatch()
dispatch.
Dispatch pending events.
bool
exit(float $timeout = 0.0)
exit.
Stop dispatching events.
void
free()
free.
Free resources allocated for this event base.
int
getFeatures()
getFeatures.
Returns bitmask of features supported.
string
getMethod()
getMethod.
Returns event method in use.
float
getTimeOfDayCached()
getTimeOfDayCached.
Returns the current event base time.
bool
gotExit()
gotExit.
Checks if the event loop was told to exit.
bool
gotStop()
gotStop.
Checks if the event loop was told to exit.
bool
loop(int $flags = -1)
loop.
Dispatch pending events.
bool
priorityInit(int $n_priorities)
priorityInit.
Sets number of priorities per event base.
bool
reInit()
reInit.
Re]initialize event base(after a fork).
bool
resume()
Tells event_base to resume previously stopped event
bool
stop()
stop.
Tells event_base to stop dispatching events.
bool
updateCacheTime()
Updates cache time