Is it possible to miss websocket events

2019-06-28 00: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

0条回答
登录 后发表回答