Submitted by Ecoste t3_zra540 in askscience
[removed]
Submitted by Ecoste t3_zra540 in askscience
[removed]
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.
[removed]
[removed]
[removed]
[removed]
[removed]
[removed]
Thank you for your submission! Unfortunately, your submission has been removed for the following reason(s):
If you disagree with this decision, please send a message to the moderators.
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.