|  | 9.1 | The TCP/IP Protocol Suite
| 9.1.7 | TCP simple acknowledgment and windowing
To govern the flow of data between devices, TCP uses a peer-to-peer flow control mechanism. The receiving host's TCP layer reports a window size to the sending host's TCP layer. This window size specifies the number of bytes, starting with the acknowledgment number, that the receiving host's TCP layer is currently prepared to receive. Window size refers to the number of bytes that are transmitted before receiving an acknowledgment. After a host transmits the window-size number of bytes, it must receive an acknowledgment before any more data can be sent. The window size determines how much data the receiving station can accept at one time. With a window size of 1, each segment carries only one byte of data and must be acknowledged before another segment is transmitted. This results in inefficient host use of bandwidth. The purpose of windowing is to improve flow control and reliability. Unfortunately, with a window size of 1, you see a very inefficient use of bandwidth, as shown in Figure . TCP sliding window TCP uses expectational acknowledgments, meaning that the acknowledgment number refers to the octet expected next. The sliding part of sliding window refers to the fact that the window size is negotiated dynamically during the TCP session. A sliding window results in more efficient host use of bandwidth because a larger window size allows more data to be transmitted pending acknowledgment. TCP sequence and acknowledgment numbers TCP provides sequencing of segments with a forward reference acknowledgment. Each datagram is numbered before transmission. At the receiving station, TCP reassembles the segments into a complete message. If a sequence number is missing in the series, that segment is retransmitted. If segments are not acknowledged within a given time period, retransmission occurs. The sequence and acknowledgment numbers are directional, which means that the communication occurs in both directions. The Figure illustrates the communication going in one direction. The sequence and acknowledgments take place with the sender on the right.