Is it possible to miss websocket events

假装没事ソ 提交于 2019-12-10 17:36:04

问题


Here is what we're doing :

We use Socket.io to broadcast our events. We experienced troubles with proxies and/or firewalls, so we only used socket.io with XHR-Polling, not Websockets. It was working well, but a lot of our users are using our app with smartphones, or bad internet connections. Sometimes, they were never receiving the broadcasted events, despite the fact they were still connected to our Node server. So we added an additional long-polling system, which looks at what you received from socket.io every X seconds, and gives you the events you missed.

Now, we're using SSL on our Node server, and we're able to enable websockets again without being blocked by firewalls.

The question is : is our additional long-polling system still useful with websockets enabled ? Is it possible to miss websockets events if you have a bad internet connection ? Or should we just use it in case of disconnection/reconnection ?

TL;DR : Is it possible to miss websockets events if you have a bad internet connection, without being disconnected ?

Thanks

来源:https://stackoverflow.com/questions/15922073/is-it-possible-to-miss-websocket-events

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!