TCP: Reliable Data transfer
- Reliable Data Transfer with TCP
- Data transfer in TCP uses the Go-back-N sliding window protocol whereeach byte is assigned a sequence number
- Example: Simple transfer (server has no data to send back to client)
- Client sends a 10 bytes message:
- Client accepts (update ACK#) message and sends ACK:
- After client processed ACK:
- NOTE:
- Only acknowledge a TCP segment that:
- has non-zero length data, or
- the SYN bit set or
- the FIN bit set.
- Only acknowledge a TCP segment that:
If you acknowledge a zero-length TCP segment (such as an ACK message), then the "other side" will also acknowledge your zero-length ACK message...
You would enter an infinite loop --- sending each other ACKs....
Rule: never ACK an ACK message !!!
- Client sends a 10 bytes message:
- Example: Bi-directional transfer (server returns a reply to client)
- Client sends a 10 bytes message:
- Server accepts (update ACK no) message (sends ACK) and sends a 30 bytes reply:
- Clients accepts (update ACK no) message (sends ACK):
- Server processes ACK:
NOTE:
- The TCP segment contains no data - the server must not send ACK for this segment !
- Client sends a 10 bytes message:
- Data transfer in TCP uses the Go-back-N sliding window protocol whereeach byte is assigned a sequence number