Command Dispatching
In a few network projects, we're asked to write an interactive shell, to receive command from user input. Here is the general pattern I used. The example I used here is from the P2P network project, and you can find my earlier post about use select to monitor user input and socket at the same time.
more ...