\Workerman\EventsEventInterface

Summary

Methods
Constants
add()
del()
clearAllTimer()
loop()
destroy()
getTimerCount()
EV_READ
EV_WRITE
EV_EXCEPT
EV_SIGNAL
EV_TIMER
EV_TIMER_ONCE
No protected methods found
N/A
No private methods found
N/A

Constants

EV_READ

EV_READ = 1 : integer

Read event.

EV_WRITE

EV_WRITE = 2 : integer

Write event.

EV_EXCEPT

EV_EXCEPT = 3 : integer

Except event

EV_SIGNAL

EV_SIGNAL = 4 : integer

Signal event.

EV_TIMER

EV_TIMER = 8 : integer

Timer event.

EV_TIMER_ONCE

EV_TIMER_ONCE = 16 : integer

Timer once event.

Methods

add()

add(mixed  $fd, integer  $flag, callable  $func, mixed  $args = null) : 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() : mixed

Destroy loop.

Returns

mixed

getTimerCount()

getTimerCount() : mixed

Get Timer count.

Returns

mixed