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

[REQUEST] useWebSocket能否自动支持心跳 #2352

Open
xmsz-stu opened this issue Nov 1, 2023 · 5 comments · May be fixed by #2534
Open

[REQUEST] useWebSocket能否自动支持心跳 #2352

xmsz-stu opened this issue Nov 1, 2023 · 5 comments · May be fixed by #2534
Assignees
Labels
feature New feature or request

Comments

@xmsz-stu
Copy link

xmsz-stu commented Nov 1, 2023

背景

  • nodejs的ws有自动封装,web希望也有,比较方便
  • 自己封装可以,但是很麻烦
  • 基本都需要心跳功能

因为

  1. 一般服务器超过60s无交互就会中断,心跳可以很轻松的解决
  2. 在特殊情况下,比如休眠/断网,ws是不会自动中断的,心跳超时可以解决

需求

  • 支持自动心跳
  • 支持心跳不储存在lastMsg,避免重渲染
  • 支持心跳超时后自动连接
@liuyib liuyib added the feature New feature or request label Nov 2, 2023
@aioros2016
Copy link

目前来看useWebSocket缺少心跳是一个比较大的缺憾

@goodjun
Copy link
Contributor

goodjun commented Apr 24, 2024

这个issue我跟进一下 @liuyib

@goodjun goodjun linked a pull request Apr 25, 2024 that will close this issue
18 tasks
@joket1999
Copy link

@goodjun 请问一下,目前还没有合并到 master 分支吗?3.8.1 的版本找不到心跳相关的参数配置

@goodjun
Copy link
Contributor

goodjun commented Sep 19, 2024

@goodjun 请问一下,目前还没有合并到 master 分支吗?3.8.1 的版本找不到心跳相关的参数配置

抱歉,还有一些优化内容,我争取一下下个版本。

@just-myself
Copy link

@goodjun 请问下最近有发布的预期时间吗,这个功能在使用websocket时比较重要

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

Successfully merging a pull request may close this issue.

6 participants