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

feat: show online number count #629

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zuowendong
Copy link
Collaborator

@zuowendong zuowendong commented Apr 19, 2024

relate to #567

效果

image

实现

基于websocket + redis

新增依赖

  • serve: @nestjs/platform-socket.io, @nestjs/websockets, socket.io
  • clinet: socket.io-client

redis 实现在线离线人员的存储
websocket 广播告知前端展现实时在线人数

@zuowendong zuowendong changed the title feat; show online number count feat: show online number count Apr 19, 2024
@baboon-king
Copy link
Collaborator

这种 类似长链接,对于前期我们服务器带来压力,这个功能其实对实时性的要求也不高
see #567 (comment)

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

Successfully merging this pull request may close these issues.

2 participants