| ISSUE 125/456 · COMPUTER SCIENCE |
~4 MIN |
FOUNDATION / TCP DELIVERY · READING DATE 2027-02-03 · FEBRUARY 2027 — NETWORKS AND SOUND
How a download puts scrambled arrivals back in order
START HERE
A downloaded document must put its letters in the right order. TCP is a shared set of communication rules that gives programs a reliable, ordered sequence of data between two computers. The network can lose or reorder the smaller packages carrying that data, so the receiving computer must track what is missing.
|
/ WHY NOW
A download may pause even while more data is arriving. That pause can be the price of refusing to hand the application a document with a hole in its middle.
|
/ THE IDEA
A byte is a unit of digital data containing eight bits, each a binary digit read as 0 or 1. TCP numbers positions in the byte stream, the sequence of those units. A package carrying several bytes identifies the first position it contains. The receiver uses those positions to assemble arrivals, recognise duplicates and report progress. An acknowledgement reports the next byte position expected after the contiguous data already received. Contiguous means with no gaps. The sender keeps unconfirmed data available so it can retransmit: send another copy if loss is detected. Arrival, acknowledgement and delivery to the reading program are therefore different events.
THE FORMAL IDEA
ACK = next missing byte after the contiguous prefix
| ACK names the acknowledgement number; a prefix is the uninterrupted beginning of the stream. | | Byte positions below are illustrative offsets starting at zero, rather than the randomly chosen starting numbers of a real connection. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Send three pieces: bytes 0–99, 100–199 and 200–299. Receive 0–99 and 200–299, but not the middle piece: ACK remains 100. Change one input: the replacement for bytes 100–199 now arrives. The contiguous prefix reaches byte 299, so ACK can advance to 300 and the held later bytes become deliverable.
|
The receiver did not need a second copy of bytes 200–299. It needed the missing bridge. Holding later data prevents the application from mistaking later characters for the ones that belonged in the gap.
/ SO WHAT?
For a text file that ordering is useful. For a time-sensitive application, waiting behind one missing section can be noticeable even if later information is already present. A progress graph showing received traffic does not necessarily show usable progress. When debugging, ask whether the application is waiting for missing earlier bytes or simply waiting for any bytes at all. Those lead to different investigations.
ONE CAVEAT |
| TCP cannot guarantee that a connection eventually succeeds if the path stays broken. It preserves byte order, not the boundaries between application messages, and it does not by itself encrypt the content. |
KEEP THIS
When a missing earlier byte blocks an ordered stream, receiving more later bytes cannot release the gap; recovering the missing bytes can.
|
NEXT: Why two steady notes can seem to pulse
|