 reception window size of host 2 is 512 and it has told host 1 to use this transmission window size. Host 1 transmitted bytes 5 to 11 earlier and it has received acknowledgment up to byte 4. Now host 1 is allowed to send all 512 bytes inside its transmission window without waiting for further acknowledgments. Introduction to Telecommunications Network Engineering Transmitted and Transmitted, Data that Data to be acknowledged unacknowledged transmitted cannot yet be transmitted 13 14 15 Window, size 9 a byte Transmission window Reception window Bidirectional TCP connection Reception window Transmission window Figure 6.50 TCP window management. 5+512=517 Host 1 Host 2 Reception window 5+512=517 size 512 data 12...21 SEQ=12 Reception 5+512=517 buffer full, data 22...44 reduce window SEQ=22 size from 512 to 128 ACK=22 22+128=150 window=128 22+128=150 data 45...67 SEQ=4! Figure 6.51 TCP window management example. Data Communications When acknowledgment is received the window is transferred SO that it contains unacknowledged bytes only. In the example in Figure 6.51, free space in the receiver's buffer is reduced and host 2 requests host 1 to reduce its transmission window size to avoid buffer overflow. If the buffer becomes full, the receiver may command the transmitter to stop data transmission by setting the window size to zero. The TCP connection is closed as shown in Figure 6.52. When an application program tells TCP that it has no more data to send, TCP will close connection in one direction. The sending TCP transmits the remaining data, waits until they are acknowledged, and then sends the TCP segment with control bit FIN in the Figure 6.48 set. The receiving end acknowledges the FIN segment, informs the application, and one transmission direction is closed [4]. When all data in the other direction have been transmitted, TCP in host 2 transmits the FIN segment. When acknowledgment of that is received by host 2, the TCP connection is closed in both directions. The destination and source hosts use a window for flo