Transport (TCP/UDP)
도입됨
어휘
| English | 의미 |
|---|---|
| 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}
연습
The UDP header carries —
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
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}
연습
After SYN (seq 0), 100 bytes then 50 sent, the server ACKs —
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
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}
연습
A live video call prefers —
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Retransmitted frames arrive too late: tolerate loss, avoid delay.