开发者

socket.io reconnect example

开发者 https://www.devze.com 2023-03-11 10:16 出处:网络
the socket.io docs s开发者_开发技巧ays we should implement our own reconnect? Does anyone have an example of a simple reconnect scheme?

the socket.io docs s开发者_开发技巧ays we should implement our own reconnect?

Does anyone have an example of a simple reconnect scheme?

The idea is that if the user reconnects within 20 seconds he should be given the same socket.io sessionid.


socket.io has reconnect support now, using the options reconnect and reconnectionDelay so you can let that handle everything for you if you need.

0

精彩评论

暂无评论...
验证码 换一张
取 消