Imagine I want to create a realtime multiplayer game, with HTML5 (client) and node.js (server).
I need to transport data very fast from the server to the clients and vice versa.
In a native application I would use UDP
for the most data (player position, ...), because it's way faster than TCP
and it's uncritical when it is lost.
In HTML5
I can (only) use WebSockets
. WebSockets is on top of TCP and thus not fast enough for a good performance.
I heard about WebRTC
, but I don't know whether this could be the solution for this problem.
Has anybody experience with it?
(I know, that WebRTC is still unsupported for the most browser, but that doesn't matter to me.)