Go backward to Connections
Go up to Top
Go forward to TCP/IP Protocol
Client-Server Model
The server basically sleeps, waiting to be contacted
by clients. There are 2 kinds of servers:
- [Iterative:] for short jobs. E.g., serve time of day.
- [Concurrent:] for long services.
It typically uses the UNIX fork
and perhaps exec system calls.
SERVER PROGRAM:
- Open communication channel and inform
local host that it is waiting at some
(well-known) port.
- Waits for clients.
- Serves clients (perhaps after forking)
- Goes back to waiting.
CLIENT PROGRAM:
- Open communication channel and connects
to a server port.
- Sends request to server.
- Receives response.
- Close channel.
Chee Yap