public function connect()
    {
        if ($this->connection->isOpened()) {
            throw new LogicException('It is not possible to re-open the connection to the EPP server.');
        }

        $this->connection->open();
        $xml = $this->connection->read();
        $this->logger->info('Greeting on connection to the EPP server.', ['body' => $xml]);

        $greeting = new Greeting($xml);
        if (!$greeting->isSuccess()) {
            throw new ConnectionException('Invalid greeting on connection to the EPP server.');
        }

        return $greeting;
    }