Kraken\Stream\AsyncStreamReader::__construct PHP Method

__construct() public method

public __construct ( resource $resource, Kraken\Loop\LoopInterface $loop, boolean $autoClose = true )
$resource resource
$loop Kraken\Loop\LoopInterface
$autoClose boolean
    public function __construct($resource, LoopInterface $loop, $autoClose = true)
    {
        parent::__construct($resource, $autoClose);
        if (function_exists('stream_set_read_buffer')) {
            stream_set_read_buffer($this->resource, 0);
        }
        $this->loop = $loop;
        $this->listening = false;
        $this->paused = true;
        $this->resume();
    }