The TCP sender's window can be divided into four parts:
1. TCP segments that have been sent and confirmed;
2. TCP segments that have been sent but not confirmed;
3. TCP segments that are not sent but are ready to be received by the receiving Party,
4, not sent and the receiving party is also ready to accept the TCP segment.
The 3rd part is the available window, the length is Snd_una + snd_wnd-snd_nxt.
The 2nd part and the 3rd part merge together, become the sending window, abbreviation window.
The left edge of the Send window is Snd_una, and the right border is Snd_una + Snd_wnd.
Similarly, a TCP receiver's window can be divided into four parts:
1. TCP segments that have been received and confirmed;
2, has received but not confirmed the TCP segment;
2, has not received but the sender has sent the TCP segment;
3. TCP segments that are not yet received but are not allowed to be sent.
Parts 1th and 2nd are merged together because there is no difference (??? )。
The left edge of the receive window is RCV_NXT, and the right border is RCV_NXT + Rcv_wnd.
The Receive window Rcv_wnd is passed to the other through the TCP Header's Window field.
In a TCP connection, the Rcv_wnd of a party equals the snd_wnd of the other party.
If it must be strictly divided into four parts, the general classification:
The left edge of the window is rcv_wup, and the right border is Rcv_wup + Rcv_wnd.
The 3rd part is Rcv_wup + RCV_WND-RCV_NXT.
Sliding windows for TCP