•  0ops   ( @0ops@lemm.ee ) 
      link
      fedilink
      English
      61
      edit-2
      1 year ago

      Nah, tcp still yeats the baby, it just verifies that it was caught unbruised, or at all. If it wasn’t that’s ok. Try again. Yeet the baby’s little sister

      • 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.

        • Broadcast would mean it’s sent to anyone. UDP packets still usually have a unicast address and thus are routed by routers and switches to specific machines, but as a connectionless protocol, UDP never validates which, if any, packets are received by the recipient like TCP does. If any verification is needed that needs to be handled higher in the OSI stack. E.g. by the application layer.

        • No no, it’s not “broadcasted”. It still has a fixed sender and receiver IP address, but UDP doesn’t verify whether the receiver got the data or not. You can implement that over UDP, but you have to do it yourself.

          With TCP, the packet will retransmitted automatically if the receiver didn’t tell the sender “yep, I got it”.

      • The benefit is that you don’t need to wait for verification from the user that they got the packet before you can send the next group of packets. If you’re, say, watching a stream, it’s not important that you received the packets because that’s just a few skipped frames or a second of lag, whereas the tradeoff on overhead is pretty big.

        TCP is more important with like file downloads where it’s okay if it takes a couple hours to get a really big file as long as that file isn’t corrupted or missing any data.

      • You’d have to be somewhere in the route from A to B to intercept it. But TCP is no different in that regard.

        TCP is connection based so both sides need to agree to connect before data is exchanged. UDP is connectionless, so it will send data from A to B (and vice versa) regardless of if the other side is available.

      • No, instead of using TLS for encryption (like most TCP traffic) UDP will use things like DTLS and SIP

        Or if you’re asking about the actual transport it’s more like TCP is going to your friend’s house and calling your mom to let her know you’re there vs UDP is going to their house and not calling.