3 ms·
Two other reasons to use UDP for low-latency use cases, even if you cannot handle actual missed packets and thus are fully reliable: - If your bandwidth use is
by comex 12y ago
Two other reasons to use UDP for low-latency use cases, even if you cannot handle actual missed packets and thus are fully reliable:
- If your bandwidth use is small, you can just spam multiple copies of each packet to decrease the chance that a laggy retransmission will be needed. If you're sending packets at a constant high rate, you can instead include copies of the last N messages in each packet, rather than just the new data.
- You can send packets directly between two NATted hosts using STUN, rather than having to rely on UPnP or manual port forwarding. Pretty obvious, but I only see one other mention of this fact in the thread, and it vastly increases the likelihood of being able to make a direct connection between two random consumer devices.