\Workerman\Events\ReactStreamSelectLoop

Class StreamSelectLoop

Summary

Methods
Properties
Constants
__construct()
add()
del()
loop()
destroy()
getTimerCount()
addReadStream()
addWriteStream()
removeReadStream()
removeWriteStream()
addTimer()
addPeriodicTimer()
cancelTimer()
futureTick()
addSignal()
removeSignal()
run()
stop()
No public properties found
No constants found
No protected methods found
$_timerIdMap
$_timerIdIndex
$_signalHandlerMap
$_eventLoop
N/A
No private methods found
No private properties found
N/A

Properties

$_timerIdMap

$_timerIdMap : array

Type

array

$_timerIdIndex

$_timerIdIndex : integer

Type

integer

$_signalHandlerMap

$_signalHandlerMap : array

Type

array

$_eventLoop

$_eventLoop : \React\EventLoop\LoopInterface

Type

\React\EventLoop\LoopInterface

Methods

__construct()

__construct() 

Base constructor.

add()

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

Add event listener to event loop.

Parameters

$fd
$flag
$func
array $args

Returns

boolean

del()

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

Remove event listener from event loop.

Parameters

mixed $fd
integer $flag

Returns

boolean

loop()

loop() : void

Main loop.

destroy()

destroy() : void

Destroy loop.

getTimerCount()

getTimerCount() : integer

Get timer count.

Returns

integer

addReadStream()

addReadStream(resource  $stream, callable  $listener) 

Parameters

resource $stream
callable $listener

addWriteStream()

addWriteStream(resource  $stream, callable  $listener) 

Parameters

resource $stream
callable $listener

removeReadStream()

removeReadStream(resource  $stream) 

Parameters

resource $stream

removeWriteStream()

removeWriteStream(resource  $stream) 

Parameters

resource $stream

addTimer()

addTimer(float|integer  $interval, callable  $callback) : \React\EventLoop\Timer\Timer|\React\EventLoop\TimerInterface

Parameters

float|integer $interval
callable $callback

Returns

\React\EventLoop\Timer\Timer|\React\EventLoop\TimerInterface

addPeriodicTimer()

addPeriodicTimer(float|integer  $interval, callable  $callback) : \React\EventLoop\Timer\Timer|\React\EventLoop\TimerInterface

Parameters

float|integer $interval
callable $callback

Returns

\React\EventLoop\Timer\Timer|\React\EventLoop\TimerInterface

cancelTimer()

cancelTimer(\React\EventLoop\TimerInterface  $timer) 

Parameters

\React\EventLoop\TimerInterface $timer

futureTick()

futureTick(callable  $listener) 

Parameters

callable $listener

addSignal()

addSignal(integer  $signal, callable  $listener) 

Parameters

integer $signal
callable $listener

removeSignal()

removeSignal(integer  $signal, callable  $listener) 

Parameters

integer $signal
callable $listener

run()

run() 

Run.

stop()

stop() 

Stop.