lib/Loop/Loop.php
public function addWriteStream($stream, callable $cb)
    {
        $this->writeStreams[(int) $stream] = $stream;
        $this->writeCallbacks[(int) $stream] = $cb;
    }
public function addWriteStream($stream, callable $cb)
    {
        $this->writeStreams[(int) $stream] = $stream;
        $this->writeCallbacks[(int) $stream] = $cb;
    }
public function addWriteStream ( $ stream , callable $ cb ) { $ this -> writeStreams [ ( int ) $ stream ] = $ stream ; $ this -> writeCallbacks [ ( int ) $ stream ] = $ cb ; }
Adds a write stream.

The callback will be called as soon as the system reports it's ready to
receive writes on the stream.

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

@param resource $stream
Adds a write stream .