How one listening port serves many clients
Follow a server from socket() to accept(), see what a full queue does to a client, and learn where client ports come from and why UDP needs one socket. Transport protocols · Computer networks.
A web server listens on one port, yet every client gets a private conversation. Follow the calls and the queue between them to see where each connection's socket comes from.
What you will learn
- Trace socket, bind, listen, the accept queue, accept and close for a TCP server
- Explain what the backlog limits and what a client sees when the queue is full
- Say where a client's source port comes from and how a UDP server serves many peers from one socket
Lesson outline
- One listener, one socket per client
- When the queue is full
- Where a client's port comes from
- A UDP server needs no accept
12 minutes · 3 scenes · 0 predict checks · 11 quiz questions
The full lesson is available with Premium.