\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 : integer

Timer id.

Type

integer

Methods

__construct()

__construct() : void

construct

add()

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

Add event listener to event loop.

Parameters

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

Returns

boolean

del()

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

Remove event listener from event loop.

Parameters

mixed $fd
integer $flag

Returns

boolean

timerCallback()

timerCallback(null  $fd, integer  $what,   $param) 

Timer callback.

Parameters

null $fd
integer $what
$param

clearAllTimer()

clearAllTimer() : void

Remove all timers.

loop()

loop() : void

Main loop.

destroy()

destroy() : void

Destroy loop.

getTimerCount()

getTimerCount() : integer

Get timer count.

Returns

integer