Search⌘ K

Exercise

Explore event-based concurrency by creating a TCP server that handles requests sequentially and then multiple connections using select(). Learn to incorporate asynchronous I/O system calls and signal handling to manage a simple file cache. This exercise helps you understand the trade-offs and complexity of event-driven, asynchronous server designs.

We'll cover the following...

In this exercise, you’ll gain some experience with event-based code and some of its key concepts. Good luck!

Questions

  1. First, write a simple server that can accept and serve TCP connections. You’ll have to poke around the Internet a bit if you don’t already know how to do this. Build this to serve exactly one request at a time; have each request be very simple, e.g., to get the current time of day. ...