\Workerman\EventsLibevent

libevent eventloop

Summary

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

Properties

$_eventBase

$_eventBase : resource

Event base.

Type

resource

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

Methods

__construct()

__construct() 

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

clearAllTimer()

clearAllTimer() : void

Remove all timers.

loop()

loop() : void

Main loop.

destroy()

destroy() : void

Destroy loop.

getTimerCount()

getTimerCount() : integer

Get timer count.

Returns

integer

timerCallback()

timerCallback(mixed  $_null1, integer  $_null2, mixed  $timer_id) 

Timer callback.

Parameters

mixed $_null1
integer $_null2
mixed $timer_id