A TCP connection has been established between host A and Host B, and the TCP Maximum segment length (MSS) is 1000 bytes. If the current congestion window of host A is 4000 bytes, after host A sends two maximum segments to host B, it receives the first acknowledgment segment sent by Host B, confirms that the receiving window advertised in the segment is 2000 bytes large, then the maximum number of bytes that host a can send to Host B is at this point: 1000 bytes.
Analysis: It is important to understand that the size of the sending window depends on min (Receive window, congestion window); But just know this is not enough, you need to understand the use of the cache here: already exist inside the data, must be confirmed to take out, otherwise have been waiting, and so on confirmation number come over.
Therefore, although the min (Receive window, congestion window) = min (2000,4000), it is theoretically possible to set the Send window value to 2000, but the 1000B data is not confirmed, so the maximum number of bytes that can be sent is 1000B.
20161223 Update:
This is important. Notice that your own send window is updated according to the latest Rwnd. But the send window = size that has been sent but not confirmed + can also be sent.