Closed ghost closed 4 years ago
用的是ws,服务器会对客户端发个ping 然后客户端反馈pong 服务器的设定是20秒ping一次,如果20秒内没收到客户端的pong就关闭连接
收到pong就标为alive
https://github.com/Billyzou0741326/bilibili-live-monitor-js/blob/fa873d4aa67d7c9259bba9c87560c9e2665cfc1b/src/server/wshost.js#L63-L65
所以client端设定一下自动对服务端的ping返回一个pong就好了
好的,谢谢大佬了。
不用不用hhh 需要的话可以详细说下需求(推测是自写了客户端?) 我看下有时间研究研究aiohttp怎么适配
不用不用hhh 需要的话可以详细说下需求(推测是自写了客户端?) 我看下有时间研究研究aiohttp怎么适配
大佬可以点进去看下我那个hhh,搞的有点像广告
没什么广告不广告的23333
那就行hhh
可否加一个这样的功能呢大佬(其实是我技术不行没写重连的),然后aiohttp就超时了