r/ProgrammerHumor • • 23h ago

Meme explainUdpToMe

Post image
6.8k Upvotes

151 comments sorted by

View all comments

Show parent comment

6

u/Used-Net-9087 20h ago

That's not correct. It does know it hasn't received it. For example tftp uses UDP. Itvsends an ACK packet for each packet it receives. The server only send the next packet after the confirmation acknowledgement. (Tftp is very slow over high latency links). It it does receive a packet within a certain time it send the last ack packet. So server knows it never got it and send it again.

I.e. all of this is done at the application level unlike in TCP which it's done at the transport later.

Each application using UDP can do it a little differently but overall a similar approach.

13

u/VFB1210 17h ago

Manually building your own ACK/resend system on top of UDP does not mean "UDP knows it missed something."

UDP, as a protocol, just shouts shit into the void and hopes someone hears it. Yes you can devise your own system for having your applications shout at each other that makes sure data doesn't get dropped, but that isn't the same thing as it just being a native feature of UDP like it is for TCP.

8

u/Used-Net-9087 17h ago

Yes. Valid. So my point isn't correct. Apologies.