🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# getRemoteIp ## 说明: ~~~ string Connection::getRemoteIp() ~~~ 获得该连接的客户端ip ## 参数 无参数 ## 范例 ~~~ $worker = new Worker('tcp://0.0.0.0:8484'); $worker->onConnect = function($connection) { echo "new connection from ip " . $connection->getRemoteIp() . "\n"; }; // 运行worker Worker::runAll(); ~~~