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 · 2 comments · May be fixed by #2534
Open

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

xmsz-stu opened this issue Nov 1, 2023 · 2 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
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.

4 participants