\Workerman\EventsEvent

libevent eventloop

Summary

Methods
Properties
Constants
__construct()
add()
del()
timerCallback()
clearAllTimer()
loop()
destroy()
getTimerCount()
No public properties found
No constants found
No protected methods found
$_eventBase
$_allEvents
$_eventSignal
$_eventTimer
$_timerId
N/A
No private methods found
No private properties found
N/A

Properties

$_eventBase

$_eventBase : object

Event base.

Type

object

$_allEvents

$_allEvents : array

All listeners for read/write event.

Type

array

$_eventSignal

$_eventSignal : array

Event listeners of signal.

Type

array

$_eventTimer

$_eventTimer : array

All timer event listeners.

[func, args, event, flag, time_interval]

Type

array

$_timerId

$_timerId : int

Timer id.

Type

int

Methods

__construct()

__construct() : void

construct

add()

add(mixed  $fd, mixed  $flag, mixed  $func, mixed  $args = array()) : bool

Add event listener to event loop.

Parameters

mixed $fd
mixed $flag
mixed $func
mixed $args

Returns

bool —

del()

del(mixed  $fd, mixed  $flag) : bool

Remove event listener from event loop.

Parameters

mixed $fd
mixed $flag

Returns

bool —

timerCallback()

timerCallback(int|null  $fd, int  $what, mixed  $param) : mixed

Timer callback.

Parameters

int|null $fd
int $what
mixed $param

Returns

mixed —

clearAllTimer()

clearAllTimer() : void

Remove all timers.

loop()

loop() : void

Main loop.

destroy()

destroy() : void

Destroy loop.

getTimerCount()

getTimerCount() : int

Get timer count.

Returns

int —