http.php
protected function readAll($socket)
    {
        $all = '';
        while (! $this->isLastPacket($next = $socket->read())) {
            $all .= $next;
        }

        return $all;
    }
protected function readAll($socket)
    {
        $all = '';
        while (! $this->isLastPacket($next = $socket->read())) {
            $all .= $next;
        }

        return $all;
    }
Reads the whole of the socket output into a single string.

@param SimpleSocket $socket  Unread socket.

@return string               Raw output if successful else false.