this post was submitted on 21 Jul 2023
1210 points (97.3% liked)

Programmer Humor

33603 readers
17 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] TheSaneWriter@lemmy.thesanewriter.com 72 points 2 years ago (24 children)

This is a really good way of explaining the difference.

[–] becool@kbin.social 13 points 2 years ago (21 children)

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

[–] r00ty@kbin.life 44 points 2 years ago (2 children)

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 12 points 2 years ago (1 children)

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

Welcome, traveler from the future

[–] r00ty@kbin.life 19 points 2 years 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.

load more comments (18 replies)
load more comments (20 replies)