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