使用阿里云 + workerman,H5 websocket每隔一段时间会收到大写的PING字符串是怎么回事?

0
<?php
use Workerman\Worker;
require_once './Workerman/Autoloader.php';

$ws_worker = new Worker("websocket://0.0.0.0:1100");

$ws_worker->count = 1;

// 当收到客户端发来的数据后返回$data给客户端
$ws_worker->onMessage = function($connection, $data) use ($ws_worker) {
foreach ($ws_worker->connections as $conn) {
$conn->send($data);
}
};

// 运行worker
Worker::runAll();
已邀请:

walkor

赞同来自: 小易

你的客户端发的

要回复问题请先登录注册