4 ms·
WebSockets are TCP-only. WebRTC can run over UDP, but it's not raw UDP. I think that's what they meant.
by desdenova 2y ago
WebSockets are TCP-only.
WebRTC can run over UDP, but it's not raw UDP. I think that's what they meant.
- kaoD 2y agoI don't have time to look into the code right now, but it might also be WebTransport: https://developer.mozilla.org/en-US/docs/Web/API/WebTransport_API https://developer.mozilla.org/en-US/docs/Web/API/WebTranspor... EDIT: actually I can't find the code, shouldn't it be linked as per GPL's license?
- junon 2y agoWebSockets also initiate a normal Http request first, further complicating things anyway.
- modeless 2y agoYes, it's WebRTC. It uses real unreliable and unordered UDP packets, peer-to-peer. But WebRTC requires a connection establishment step to happen first, so it can't send traffic to arbitrary UDP services, only cooperating WebRTC peers. Which is fine for multiplayer games.