What is TCP?
TCP offers reliable ordered bytes through acknowledgements and retransmission. Applications must define their own message boundaries and timeouts, and retransmission can delay later data despite the transport’s reliability guarantees.
The key idea
TCP provides an ordered, reliable byte stream between endpoints, useful for tasks such as transferring a robot map or sending configuration. Sequence numbers and acknowledgements track received data, and missing bytes are retransmitted. Later bytes can wait until the missing portion arrives before being delivered to the application. TCP does not retain the message boundaries of individual writes, so applications need framing such as lengths or delimiters. They must also handle disconnections and timeouts. Reliable delivery is valuable, but recovery delays mean it does not by itself guarantee a hard deadline for robot control.
What to remember
- TCP delivers a reliable ordered byte stream.
- Retransmission can delay delivery of later bytes.
- Applications define framing, timeouts, and disconnection behavior.
Check your understanding
Why does a TCP application need lengths or delimiters?
Show the explanation
TCP exposes a byte stream and does not preserve application message boundaries.