3 ms·
Damn. I disagree with all of your points. Use UDP only if you satisfy all the following conditions: * Don't care about loosing data * Don't care about rec
by user5994461 10y ago
Damn. I disagree with all of your points.
Use UDP only if you satisfy all the following conditions:
* Don't care about loosing data
* Don't care about receiving data out of order
* Not sending stream of data but individual messages ( < 580 bytes)
* Don't care about the other side of the connection being dead or terminated, and not knowing about it
- Dylan16807 10y agoUDP doesn't cause things like not knowing if the other end is gone. You're being kind of ridiculous.
- user5994461 10y agoUDP is connectionless, it just sends data to <somewhere>. Doesn't care if that somewhere is online, or available, or exists at all.
- Dylan16807 10y agoIf you don't check for returns, TCP isn't going to help either. The requirements you listed don't make sense as written. Nobody would ever use UDP.
- user5994461 10y agoTCP establishes a connection when it starts and it has build-in timeouts (and various mechanisms) to detect dead connections. TCP will signal to the application if the destination is unavailable or lost. The requirements make sense and the common usages for UDP fit these requirements. It's correct that [almost] nobody ever uses UDP. It's a niche protocol for a very few specific use cases, one of which is real-time FPS/RTS/MOBA games (which fits all the criteria I listed).
- the_mitsuhiko 10y agoTCP by itself does not detect dead connections.
- y4mi 10y agowhile its technically not a timeout, it is stopping the network traffic the TCP packets require an ACK ever n packets, as defined by the FREQ field. If the ACK isn't received, no further packets are send.
- raarts 10y ago> it's correct that [almost] nobody ever uses UDP Skype, Facetime, WhatsApp, Hangouts, Telco VoIP, Facebook Live, YouTube Live, Surveillance Cams, most VPNs.