Methods summary
public
|
|
public
|
#
addReadStream( resource $stream, callable $listener )
Register a listener to be notified when a stream is ready to read.
Register a listener to be notified when a stream is ready to read.
Parameters
- $stream
resource $stream The PHP stream resource to check.
- $listener
callable $listener Invoked when the stream is ready.
Implementation of
|
public
|
#
addWriteStream( resource $stream, callable $listener )
Register a listener to be notified when a stream is ready to write.
Register a listener to be notified when a stream is ready to write.
Parameters
- $stream
resource $stream The PHP stream resource to check.
- $listener
callable $listener Invoked when the stream is ready.
Implementation of
|
public
|
#
removeReadStream( resource $stream )
Remove the read event listener for the given stream.
Remove the read event listener for the given stream.
Parameters
- $stream
resource $stream The PHP stream resource.
Implementation of
|
public
|
#
removeWriteStream( resource $stream )
Remove the write event listener for the given stream.
Remove the write event listener for the given stream.
Parameters
- $stream
resource $stream The PHP stream resource.
Implementation of
|
public
|
#
removeStream( resource $stream )
Remove all listeners for the given stream.
Remove all listeners for the given stream.
Parameters
- $stream
resource $stream The PHP stream resource.
Implementation of
|
public
React\EventLoop\Timer\TimerInterface
|
#
addTimer( integer|float $interval, callable $callback )
Enqueue a callback to be invoked once after the given interval.
Enqueue a callback to be invoked once after the given interval.
Parameters
- $interval
integer|float $interval The number of seconds to wait before execution.
- $callback
callable $callback The callback to invoke.
Returns
Implementation of
|
public
React\EventLoop\Timer\TimerInterface
|
#
addPeriodicTimer( integer|float $interval, callable $callback )
Enqueue a callback to be invoked repeatedly after the given interval.
Enqueue a callback to be invoked repeatedly after the given interval.
Parameters
- $interval
integer|float $interval The number of seconds to wait before execution.
- $callback
callable $callback The callback to invoke.
Returns
Implementation of
|
public
|
|
public
boolean
|
|
public
|
#
nextTick( callable $listener )
Schedule a callback to be invoked on the next tick of the event loop.
Schedule a callback to be invoked on the next tick of the event loop.
Parameters
- $listener
callable $listener The callback to invoke.
Implementation of
|
public
|
#
futureTick( callable $listener )
Schedule a callback to be invoked on a future tick of the event loop.
Schedule a callback to be invoked on a future tick of the event loop.
Parameters
- $listener
callable $listener The callback to invoke.
Implementation of
|
public
|
#
tick( )
Perform a single iteration of the event loop.
Perform a single iteration of the event loop.
Implementation of
|
public
|
#
run( )
Run the event loop until there are no more tasks to perform.
Run the event loop until there are no more tasks to perform.
Implementation of
|
public
|
#
stop( )
Instruct a running event loop to stop.
Instruct a running event loop to stop.
Implementation of
|