6 ms·
Where does the low latency in WebRTC come from? Is it just packet ordering in TCP or is there something more to it?
by comboy 10y ago
Where does the low latency in WebRTC come from? Is it just packet ordering in TCP or is there something more to it?
- Franciscouzo 10y agoYou can't do packet reordering on top of TCP as it is already ordered, RTCDataChannel uses SCTP instead.
- pthatcherg 10y agoYou can receive data messages our of order. That's all there is to it. If you could receive TCP out of order, you could just use TCP.
- gravypod 10y agoIs there a way to specifiy ordering on specific packet types?
- oneweekwonder 10y agoFrom the Article: Because SCTP is configurable, we can open multiple data channels with different settings, which saves us tons of work! Typically we have: an unreliable and unordered data channel for game state data and user inputs a reliable and ordered data channel for chat messages, scores and deaths
- manquer 10y agoAlso WebRTC is inherently p2p . So you can connect directly to the other peer without server getting involved expect for connection (STUN and TURN). Basically message via the LAN even. Latency improves in many scenarios.
- banachtarski 10y agoLatency has very little to do with the p2p aspect. In a client-server setting, the use of RTP/SCTP to communicate payloads between two clients would have significantly less latency than, say, a P2P TCP connection.