在workerMan中,有事件可以获取到客户端ip
$worker = new Worker('websocket://0.0.0.0:8484'); $worker->onConnect = function($connection) { echo "new connection from ip " . $connection->getRemoteIp() . "\n"; };
在GatewayWorker中需要怎样获取?
gateway手册有 http://workerman.net/gatewaydoc/gateway-worker-development/server.html
gateway手册有
http://workerman.net/gatewaydoc/gateway-worker-development/server.html