TCP gives you a reliable stream, so data is not lost (assuming the core network is not crashing).
The OS at both ends has buffers that take care of bytes when you are not reading them. These buffers have a finite size, if they are full, TCP has flow control - essentially, the end of the send detects that the buffers are full and stop sending until more free space becomes available.
source
share