[ Pobierz całość w formacie PDF ]
.As long as each command they send to the server issmaller than PIPE_BUF (see above), they can all use the samenamed pipe to send data to the server.All clients can easily know thename of the server's incoming fifo.However, the server can not use a single pipe to communicate with theclients.If more than one client is reading the same pipe, there is noway to ensure that the appropriate client receives a given response.A solution is to have the client create its own incoming pipe beforesending data to the server, or to have the server create its outgoingpipes after receiving data from the client.Using the client's process ID in the pipe's name is a common way toidentify them.Using fifos named in this manner, each time the clientsends a command to the server, it can include its PID as part of thecommand.Any returned data can be sent through the appropriately namedpipe.Go to the first, previous, next, last section, table of contents
[ Pobierz całość w formacie PDF ]