top | item 2942723

(no title)

hyung | 14 years ago

I'd like to add that, in practice, socket.io doesn't work well for mobile HTML5 multiplayer games. We found that long-polling requests tend to get dropped without informing the mobile client.

Our solution so far has been to roll our own mobile networking layer, with redundancies and timeouts especially tuned for mobile.

discuss

order

catshirt|14 years ago

isn't is nearly the whole point of socket.io to use the optimal available transport? so if it's using long-polling, it would seem sockets are not available on that platform.

if that's the case, what is the method of communication for your networking layer?

hyung|14 years ago

At its core, our networking layer uses long-polling, but we added several modifications to attempt to keep the requests alive. We also drastically changed the timeout values based on testing directly on the mobile devices.

We found that vanilla long-polling works sometimes on iPhone and some Android phones. But it often introduces huge latencies, and it often just fails for no apparent reason on some Android devices.