PHP Class Workerman\Events\React\StreamSelectLoop

Inheritance: extends React\EventLoop\StreamSelectLoop
Mostra file Open project: walkor/workerman

Public Methods

Method Description
addSignal ( $signal, $callback ) : boolean Add signal handler.
removeSignal ( $signal ) Remove signal handler.

Protected Methods

Method Description
streamSelect ( array &$read, array &$write, integer | null $timeout ) : integer | false Emulate a stream_select() implementation that does not break when passed empty stream arrays.

Method Details

addSignal() public method

Add signal handler.
public addSignal ( $signal, $callback ) : boolean
$signal
$callback
return boolean

removeSignal() public method

Remove signal handler.
public removeSignal ( $signal )
$signal

streamSelect() protected method

Emulate a stream_select() implementation that does not break when passed empty stream arrays.
protected streamSelect ( array &$read, array &$write, integer | null $timeout ) : integer | false
$read array
$write array
$timeout integer | null Activity timeout in microseconds, or null to wait forever.
return integer | false The total number of streams that are ready for read/write. Can return false if stream_select() is interrupted by a signal.