previous | start | next

Remote Login Server Example

A slightly simplified description of a remote login server:

  1. reads input from the remote user
  2. writes this input to a local application
  3. reads the response from the local application
  4. writes the response back to the remote user

Which of the 4 operations (2 reads, 2 writes) should be attempted first?

This problem can be handled sequentially using the select system call. (See the code on pages 40 - 42)

It is rather complex looking and involves these steps:

The code is rather good at obscuring what it does and is admittedly complicated.



previous | start | next