Question
Write a client and a server program that prove the concept of private FIFOs for use by multiple clients. Use your own proof of concept
Write a client and a server program that prove the concept of private FIFOs for use by multiple clients.
Use your own proof of concept or do one of the following:
1) In a client program, determine a private FIFO name using getpid(). Prompt the user to enter two ints: number1 and number2. Store the private FIFO name and the two integers in a struct and write the struct to the server through a common FIFO. The server creates and opens the private FIFO. The server then finds the sum of the two numbers: number1 + number2, and writes the sum back to the client in the private FIFO. Output for two runs of this program
2) Write the code for a client that sends the server an integer and a private FIFO name through a common FIFO. Invoke this client 3 separate times. Write the code for a server that adds the integers that it receives from all three clients and sends the sum back to all 3 clients through their private FIFOs.
Output for two runs of this program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started