SimpleHttpResponse::readAll PHP Method

readAll() protected method

Reads the whole of the socket output into a single string.
protected readAll ( SimpleSocket $socket ) : string
$socket SimpleSocket Unread socket.
return string Raw output if successful else false.
    protected function readAll($socket)
    {
        $all = '';
        while (!$this->isLastPacket($next = $socket->read())) {
            $all .= $next;
        }
        return $all;
    }