Why should I use TCP when I can just add segment numbers to UDP and resend my UDP packets a few times?
That's the wrong question. Why would you add segment numbers and retransmit tracking to UDP if you could just use TCP?
>>54657651
Because congestion management.
http://intronetworks.cs.luc.edu/current/html/reno.html
Read chapters 14 and 15 too.
You fucking turbo losers are even contrarian on the fucking network protocol. Go back to the fucking irc circlejerk and stay there.
>>54657705
this is the main reason
>>54657651
>and resend my UDP packets a few times
Because then you've managed to generate significantly more traffic than with TCP while still having no guarantee that any of it arrived
>>54657651
read up on Google's QUIC protocol. Provides reliability on top of UDP transport. If you use chrome or chomium as your browser, you're already using QUIC for youtube videos and other google content. (check wireshark)
What you really wanna do with UDP is number your packets and then set up acknowledgements, resend and dallying. Take a look at this example:
https://github.com/psok/COMP474Checkers/tree/master/app/src/main/java/com/checkers/kingme/comp474checkers/network
But keep in mind that this is only viable for short messages, not for larger data transmissions. I mean, it works for, say, sending a file, but it won't attempt to saturate your link like any number of TCP implementations will - unless you implement that by hand, and trust me, you don't wanna do that, because that's fairly hard to get right (many TCP implementations still haven't, actually).
>>54657812
a lot of video streaming is UDP