Differences between websockets and long polling for turn based game server

For anyone else who may be wondering, it could depends on how long typical interactions go between events? Websocket: Anything more than a few tens of seconds, I don’t think keeping a websocket open is particularly efficient (not to mention that IIRC it would disconnect anyway if the app loses focus) Long polling: This forces … Read more

What are Long-Polling, Websockets, Server-Sent Events (SSE) and Comet?

In the examples below the client is the browser and the server is the webserver hosting the website. Before you can understand these technologies, you have to understand classic HTTP web traffic first. Regular HTTP: A client requests a webpage from a server. The server calculates the response The server sends the response to the … Read more

tech