企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# getRemotePort ## 说明: ```php int Connection::getRemotePort() ``` 获得该连接的客户端端口 ## 参数 无参数 ## 范例 ```php use Workerman\Worker; require_once __DIR__ . '/Workerman/Autoloader.php'; $worker = new Worker('websocket://0.0.0.0:8484'); $worker->onConnect = function($connection) { echo "new connection from address " . $connection->getRemoteIp() . ":". $connection->getRemotePort() ."\n"; }; // 运行worker Worker::runAll(); ```