Transport (TCP/UDP)
Introduit
Vocabulaire
| English | Sens |
|---|---|
| UDP/ˌjuː diː ˈpiː/ | 8-byte header — ports, length, checksum — a postcard. TCP: sequence numbers, acknowledgements, retransmission, flow and congestion control — a courier with a ledger. |
| TCP/ˌtiː siː ˈpiː/ | TCP |
| three-way handshake | three-way handshake |
English
Two postcards and a courier
- UDP: 8-byte header — ports, length, checksum — a postcard. TCP: sequence numbers, acknowledgements, retransmission, flow and congestion control — a courier with a ledger.
- The three-way handshake (SYN, SYN-ACK, ACK) opens a connection; FINs close it.

{exercise:uni-cs0904-two}
Pratique
The UDP header carries —
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
8 bytes: two ports, a length, a checksum - the postcard.
English
The ledger
- SYN consumes sequence 0; the server SYN-ACK carries its own 0. Client sends 100 bytes: seq 1, server ACKs 101. Sends 50: seq 101, ACK 151.
- A 30-byte segment at seq 151 is lost: the cumulative ACK stays 151 until the timeout retransmits — then ACK 181. One ACK number summarises the whole receive state.
{exercise:uni-cs0904-ledger}
Pratique
After SYN (seq 0), 100 bytes then 50 sent, the server ACKs —
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Cumulative: 1 + 100 + 50 = 151 - the next byte expected.
English
Choosing UDP
- DNS fits in one UDP datagram: a request is one packet, and if it is lost the client re-asks. Video calls tolerate loss but not delay: a retransmitted frame due in 30 ms arrives too late to matter.
- TCP guarantees order and delivery, never latency; flow control protects the receiver's buffer, congestion control protects the network — two different windows.
{exercise:uni-cs0904-choice}
Pratique
A live video call prefers —
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Retransmitted frames arrive too late: tolerate loss, avoid delay.