Added epp poll; needs more testing once other functions are done

This commit is contained in:
Pinga 2023-08-19 20:57:39 +03:00
parent 47ebb5a3d7
commit 1d31db8e6c
3 changed files with 108 additions and 0 deletions

View file

@ -9,6 +9,7 @@ require_once 'epp-check.php';
require_once 'epp-info.php';
require_once 'epp-create.php';
require_once 'epp-renew.php';
require_once 'epp-poll.php';
use Swoole\Coroutine\Server;
use Swoole\Coroutine\Server\Connection;
@ -133,6 +134,17 @@ $server->handle(function (Connection $conn) use ($table, $db, $c) {
sendGreeting($conn);
break;
}
case isset($xml->command->poll):
{
$data = $table->get($connId);
if (!$data || $data['logged_in'] !== 1) {
sendEppError($conn, 2202, 'Authorization error');
$conn->close();
}
processPoll($conn, $db, $xml, $data['clid']);
break;
}
case isset($xml->command->check) && isset($xml->command->check->children('urn:ietf:params:xml:ns:contact-1.0')->check):
{