GatewayWorker
GatewayWorker copied to clipboard
客户端发送$opcode === 0x9时,为什么不把当前连接的pingNotResponseCount = -1呢?
if ($opcode === 0x9) {
if ($recv_len >= $current_frame_length) {
//****
} else {
//为什么不添加此行呢?
$connection->pingNotResponseCount = -1;
$connection->send($ping_data);
}
$connection->websocketType = $tmp_connection_type;
if ($recv_len > $current_frame_length) {
return static::input(\substr($buffer, $current_frame_length), $connection);
}
}
添加此行,客户端无需定时发送opcode = 0x1 的普通消息
赞同啊