Comments

You must log in or register to comment.

icedrift t1_j12m507 wrote

>why does there need to be a handshake at all? Why can't Bob send 1000 packets, each annotated with a sequence from 1000-2000, and at the end sends a "closing packet" saying "just ended sending you seq 1000-2000, tell me if you missed any and then I'll retransmit"?

The handshake is necessary to verify incoming packets are coming from the correct source. If Alice just asks Bob for data without establishing a handshake she has no garuntee that Bob ever got the request or that the response isn't coming from a malicious third party. UDP technically doesn't have a handshake built into it's protocol but any streaming service that uses UDP implements their own handshake in the application layer.

>Why can't we just do:Alice sends sequence number and Bob sends sequence number back? What failure case does the third ACK prevents from happening? A comparisonor example between how a 2 way would be different from a 3 way would be great, but I can't find any online.

The final ack of the three way handshake tells the server that the client is ready to receive data. Without it the server wouldn't know when the client is ready to receive data.

6

Ecoste OP t1_j12n6qp wrote

  • To first point: But why can't Bob send Alice 10 packets, each annotated with their own seq or 'id' and then send a terminal packet saying " I just sent you 10 packets, ids from 60-70" and then Alice will confirm if they received them all or not. Doesn't it do this already? Edit: I guess it just doesn't send that last terminal confirmation packet since the way they're doing it is more efficient since you don't have to wait for the terminal packet for Alice to wait for.

  • To second point: Why does the server care if the client is ready to receive packets? Just send them and retransmit if client doesn't send the acknowledgement packet. If no ack comes in some timeout value then assume destination is offline/can't receive.

1

askscience-ModTeam t1_j13319w wrote

Thank you for your submission! Unfortunately, your submission has been removed for the following reason(s):

  • We do not debunk or vet theories or offer peer review on /r/AskScience. For more information regarding this and similar issues, please see our guidelines

If you disagree with this decision, please send a message to the moderators.

1