I come across following, while reading TCP from Forouzan's book:
We can define the following rules for the retransmission timer:
- When TCP sends the segment in front of the sending queue, it starts the timer.
- When the timer expires, TCP resends the first segment in front of the queue, and restarts the timer.
- When a segment or segments are cumulatively acknowledged, the segment or segments are purged from the queue.
- If the queue is empty, TCP stops the timer; otherwise, TCP restarts the timer.
My doubt is what happens to timer when we receive ACK for segment for which we started timer? Is it simply reset for any segment which will be sent in future? (Note that I am effectively asking what happens to timer after purging segments as stated in point 3.)