gatewayWorker收到连接事件后如何获取到客户端IP

huagaojian

在workerMan中,有事件可以获取到客户端ip

$worker = new Worker('websocket://0.0.0.0:8484');
$worker->onConnect = function($connection)
{
    echo "new connection from ip " . $connection->getRemoteIp() . "\n";
};

在GatewayWorker中需要怎样获取?

5482 1 0
1个回答

年代过于久远,无法发表回答
×
🔝