ALL
The Pitfall of WebSocket Disconnections Caused by Browser Power-Saving Mechanisms
PrefaceRecently, while using WebSocket (WS) connections, we encountered frequent disconnection issues, occurring hundreds of times per day for a single user. Although using the auto-reconnect feature of socket.io allowed us to quickly restore connections after disconnections, it did not guarantee that every reconnection would successfully receive WS messages. Therefore, we conducted several investigations and tests.Ultimately, we identified the root cause of the issue: the browser's power-saving mechanism, which inadvertently became the culprit behind the problem.Overview of Browser Power-Savi...
Move.Me Writing Your Own WebSocket Server
The WebSocket protocol has applications beyond plain vanilla web development. I will explain how the protocol works, how to implement your own server and share some insights I had along the way. Before we get down and dirty, I will explain what I’ve been doing with it.At this point I expect many of you are saying “I’m not working on a web game this doesn’t seem relevant to me.†Well, neither am I. I embed a WebSocket server into my game engine and with a local web application use the WebSocket protocol as a medium to control, configure and monitor my game...
8,243 0 SOCKET NETWORKING WEBSOCKET SERVER DEVELOPMENT