TCP/IP Lean: Web Servers for Embedded Systems, Second Edition

The key word in understanding TCP is connection. TCP establishes the logical equivalent of a physical connection between two points. Data then passes bidirectionally along this connection. Both sides must keep track of the data sent and received so that they can detect any omissions or duplications in the data stream (Figure 6.1).
Data is sent in blocks (IP datagrams), and as already discussed in Chapter 2, the nodes can track in various ways the quantity of data sent and received.
A lockstep method (the sender waits until each block has been acknowledged before sending the next one) is a relatively inefficient way of transferring bulk data. Block sequencing, where each block is individually numbered, is better for bulk data transfers because the recipient need not acknowledge each block as it arrives but can delay until several blocks have arrived and acknowledge them all with one response.
The byte-sequencing scheme adopted by TCP goes one stage further, in that both sides track the byte count of the transmitted and received data. After an appropriate amount of data has been received, the recipient acknowledges that byte count, irrespective of the number of blocks it represents. This gives greater flexibility in avoiding congestion, as you will see later.
I've already used these terms informally, but now is the time to tie down their definitions.
The sequence number indicates the position of the current data block in the...