-
Notifications
You must be signed in to change notification settings - Fork 0
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
三个建议 #1
Comments
|
如果您可以实现部分或全部的代码,欢迎您发起 pr。 |
heartbeat 是约 90s 一次的,感觉如果连续 120s 没有心跳就是寄了。 寄了就退出,能否以一个外部程序调用连接 ws 的程序的形式运行,然后连接程序被结束了就重新打开一个?(说胡话 ing……) |
js 我不会写(草)我去学学去 |
emm 如果网络断开了 ws 还不会自动断开的话,那我觉得 ws 的机制有问题 迷之自信() |
hyc1230
added a commit
that referenced
this issue
Dec 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
断开连接的处理
当断网之后 heartbeat 没有正常被 receive,洛谷的 ws 连接会断开,这个时候客户端并没有明确提示断开了,但是后面的私信并不会被正确接收。
希望可以添加一个断开连接的处理,自动重连或者提示手动重新打开( )
并且可以在打开的时候通过请求
https://www.luogu.com.cn/user/notification?_contentOnly
然后查看"unreadMessageCount"
在上线的时候通知下线时在洛谷有多少条未读消息(此处大概无必要)密码登陆
可以弄一个洛谷验证码识别的模块,最好是使用一些现成的 api 之类的(例如说 exlg 的验证码识别),以实现密码登陆
通知提醒
可以以一个适当的间隔请求
https://www.luogu.com.cn/user/notification?_contentOnly
,并检查"unreadNoticeCount"
处。?_contentOnly&type=1
,&type=2
和&type=3
分别对应 @我的,回复 和 系统通知。The text was updated successfully, but these errors were encountered: