The Transmission Control Protocol (TCP) is responsible for taking care of these issues. At a high level, the data stream is broken up into segments, each of which has a length and a sequence number, which tells you where it goes in the stream.
Sort: