79
submitted 1 year ago* (last edited 1 year ago) by speaker_hat@lemmy.one to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments

This is a really good way of explaining the difference.

[-] becool@kbin.social 1 points 1 year ago

So, UDP just sends it out there and anyone can intercept it?

[-] r00ty@kbin.life 2 points 1 year ago

No. Both UDP and TCP can be intercepted the same. The difference is that UDP sends a packet to an address. But doesn't have any in built system to check that it arrived, that it arrived intact or to resend if it didn't. There's also no built in way to protect against spoofing or out of order packet delivery. But generally implementations will handle the ones that are important of those themselves.

TCP establishes a circuit, packets are sent, verified and resent if required until the original data, in the correct order is delivered to the application. Also there is some protection against spoofing with sequence numbering. The downside is that time sensitive data might be delayed because of the retransmission and re-assembling. Which is why time sensitive streams like VoIP are usually sent over UDP.

[-] Celivalg@iusearchlinux.fyi 3 points 1 year ago

Btw, on my device you sent the message -110min ago, not 110, -110

Welcome, traveler from the future

[-] r00ty@kbin.life 4 points 1 year ago

Yeah, this is a known interoperability thing between kbin and lemmy. So, I'm afraid I can't give you this week's lottery numbers ahead of time.

[-] Clent@lemmy.world 1 points 1 year ago

No. UDP is at the packet level. Interception is a different layer.

To use to today's language, UDP yeets the packets at you as fast as it can generate them.

It doesn't care if you catch any of them.

Don't yeet the baby.

[-] b3nsn0w@pricefield.org 1 points 1 year ago

actually, do yeet the baby if you have an application with different needs. for example, if you want to play a game, you're better off yeeting 60 babies a second and just hope that whoever is on the side catches enough of them to get a smooth stream of babies, than making sure every baby is handed gently to the next person and get the whole line clogged up the moment anything disrupts it. if you just use the yeetomatic 3000 you're always getting fresh babies on the other end, a few might just be dropped in the process

load more comments (5 replies)
this post was submitted on 21 Jul 2023
79 points (96.5% liked)

Programmer Humor

32219 readers
18 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS