\Workerman\EventsEv

ev eventloop

Summary

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

Properties

$_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 : integer

Timer id.

Type

integer

Methods

add()

add(mixed  $fd, integer  $flag, callable  $func, mixed  $args = null) : boolean

Add a timer.

Parameters

mixed $fd
integer $flag
callable $func
mixed $args

Returns

boolean

del()

del(mixed  $fd, integer  $flag) : boolean

Remove a timer.

Parameters

mixed $fd
integer $flag

Returns

boolean

timerCallback()

timerCallback(\EvWatcher  $event) 

Timer callback.

Parameters

\EvWatcher $event

clearAllTimer()

clearAllTimer() : void

Remove all timers.

loop()

loop() : void

Main loop.

destroy()

destroy() : void

Destroy loop.

getTimerCount()

getTimerCount() : integer

Get timer count.

Returns

integer