src/Neutrino/HttpClient/Provider/StreamContext/Streaming.php
protected function streamContextExec($context)
    {
        $emitter = $this->getEventsManager();

        try {
            $handler = fopen($this->uri->build(), 'r', null, $context);

            $this->streamContextParseHeader($http_response_header);

            $this->response->setProviderDatas(stream_get_meta_data($handler));

            $emitter->fire(self::EVENT_START, $this);

            $buffer = $this->bufferSize ? $this->bufferSize : 4096;

            while (!feof($handler)) {
                $emitter->fire(self::EVENT_PROGRESS, $this, stream_get_contents($handler, $buffer));
            }

            $this->response->setProviderDatas(stream_get_meta_data($handler));

            $emitter->fire(self::EVENT_FINISH, $this);

            return true;
        } finally {
            if (isset($handler) && is_resource($handler)) {
                fclose($handler);
            }
        }
    }
protected function streamContextExec($context)
    {
        $emitter = $this->getEventsManager();

        try {
            $handler = fopen($this->uri->build(), 'r', null, $context);

            $this->streamContextParseHeader($http_response_header);

            $this->response->setProviderDatas(stream_get_meta_data($handler));

            $emitter->fire(self::EVENT_START, $this);

            $buffer = $this->bufferSize ? $this->bufferSize : 4096;

            while (!feof($handler)) {
                $emitter->fire(self::EVENT_PROGRESS, $this, stream_get_contents($handler, $buffer));
            }

            $this->response->setProviderDatas(stream_get_meta_data($handler));

            $emitter->fire(self::EVENT_FINISH, $this);

            return true;
        } finally {
            if (isset($handler) && is_resource($handler)) {
                fclose($handler);
            }
        }
    }
@param $context

@return bool