lib/Loop/Loop.php
public function addReadStream($stream, callable $cb)
    {
        $this->readStreams[(int) $stream] = $stream;
        $this->readCallbacks[(int) $stream] = $cb;
    }
public function addReadStream($stream, callable $cb)
    {
        $this->readStreams[(int) $stream] = $stream;
        $this->readCallbacks[(int) $stream] = $cb;
    }
public function addReadStream ( $ stream , callable $ cb ) { $ this -> readStreams [ ( int ) $ stream ] = $ stream ; $ this -> readCallbacks [ ( int ) $ stream ] = $ cb ; }
Adds a read stream.

The callback will be called as soon as there is something to read from
the stream.

You MUST call removeReadStream after you are done with the stream, to
prevent the eventloop from never stopping.

@param resource $stream
Adds a read stream .