Receiver schedules an ACK on receipt of "next message."
TCP acknowledges the next segment it expects to receive, not the last segment it received.
- In the example, N+1 is blocked, so the receiver keeps acknowledging N+1 (the next segment it expects to receive).
When the receiver receives a data segment, the receiver checks that data segment sequence number (byte count). If the data received fills in the next sequence of numbers expected, the receiver indicates that the data segment was received in order. The receiver then delivers all the data that it holds to the target application, and updates the sequence number to reflect the next byte number in expected order.
When this process is complete, the receiver performs one of these actions:
■ Immediately transmits an acknowledgment (ACK) to the sender
■ Schedules an ACK to be transmitted to the sender after a short delay
The ACK notifies the sender that the receiver received all data segments up to but not including the byte number in the new sequence number. Receivers usually try to send an ACK in response to alternating data segments they receive. They send the ACK because, for many applications, if the receiver waits out a small delay, it can efficiently piggyback its reply acknowledgment on a normal response to the sender. However, when the receiver receives a data segment out of order, it immediately responds with an ACK to direct the sender to retransmit the lost data segment.
Was this article helpful?