protected function read($socket)
    {
        $result = fgets($socket);
        if ($result === false) {
            throw new \RuntimeException();
        }
        return $this->unserialize($result);
    }
protected function read($socket)
    {
        $result = fgets($socket);
        if ($result === false) {
            throw new \RuntimeException();
        }
        return $this->unserialize($result);
    }
protected function read ( $ socket ) { $ result = fgets ( $ socket ) ; if ( $ result === false ) { throw new \ RuntimeException ( ) ; } return $ this -> unserialize ( $ result ) ; }
Read data with unserialize from a socket.

@param   resource  $socket
@return  void
@throws  \RuntimeException
Read data with unserialize from a socket .