Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

客户端发送$opcode === 0x9时,为什么不把当前连接的pingNotResponseCount = -1呢? #76

Open
yljphp opened this issue May 20, 2021 · 2 comments

Comments

@yljphp
Copy link

yljphp commented May 20, 2021

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);
    }
 }
@yljphp
Copy link
Author

yljphp commented May 20, 2021

添加此行,客户端无需定时发送opcode = 0x1 的普通消息

@zhuwei
Copy link

zhuwei commented Jun 8, 2021

赞同啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants