Client/Server Model
- Servers wait for incoming connections and provide a service (e.g., web, mail, etc.)
- Clients make connections to servers
- Each endpoint is a running program
Request/Response Cycle
Most network programs use a request/ response model based on messages
- Client sends a request message (e.g., HTTP)
GET /index.html HTTP/1.0
- Server sends back a response message
HTTP/1.0 200 OK
Content-type: text/html
Content-length: 48823 <HTML>
...
- The exact format depends on the application
- Close the connection (of course the server continues to listen for more clients)