Chapter 4.  Berkeley socket API, Sys V IPC and I/O multiplexing

Table of Contents

Berkeley socket API, Sys V IPC, I/O multiplexing
A simple client/server sample
The client side
The server side
Testing of the example

Abstract

In this chapter we are going to create a sample program from the examples of [PP] to help the reader get acquainted with

  • Berkeley socket API

  • I/O multiplexing

  • forking processes

  • mutual exclusion

  • and semaphore arrays.

„We should select any person from the 1.5 billion inhabitants of the Earth - anyone, anywhere at all. He bet us that, using no more than five individuals, one of whom is a personal acquaintance, he could contact the selected individual using nothing except the network of personal acquaintances.”

„Tessék egy akármilyen meghatározható egyént kijelölni a Föld másfél milliárd lakója közül, bármelyik pontján a Földnek - ő fogadást ajánl, hogy legföljebb öt más egyénen keresztül, kik közül az egyik neki személyes ismerőse, kapcsolatot tud létesíteni az illetővel, csupa közvetlen - ismeretség - alapon,”

—Karinthy Frigyes Láncszemek

Berkeley socket API, Sys V IPC, I/O multiplexing