Amp\Artax\HttpTunneler::doRead PHP Method

doRead() private method

private doRead ( HttpTunnelStruct $struct )
$struct HttpTunnelStruct
    private function doRead(HttpTunnelStruct $struct)
    {
        $socket = $struct->socket;
        $data = @fread($socket, self::$READ_GRANULARITY);
        if ($data != '') {
            $this->parseSocketData($struct, $data);
        } elseif ($this->isSocketDead($socket)) {
            \Amp\cancel($struct->readWatcher);
            $struct->promisor->fail(new SocketException('Proxy CONNECT failed: socket went away while awaiting tunneling response'));
        }
    }