Chapter 30. Client/Server Design Alternatives

Introduction

We have several choices for the type of process control to use when writing a Unix server:

  • Our first server, Figure 1.9, was an iterative server, but there are a limited number of scenarios where this is recommended because the server cannot process a pending client until it has completely serviced the current client.

  • Figure 5.2 was our first concurrent server and it called fork to spawn a child process for every client. Traditionally, most Unix servers fall into this category.

  • In Section 6.8, we developed a different version of our TCP server consisting of a single process using select to handle any number of clients.

  • In Figure 26.3, we modified our concurrent server to create one thread per ...

Get The Sockets Networking API: UNIX® Network Programming Volume 1, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.