Question: Use FIFO to write a client / server application. The client will receive two integer numbers from the command line and send the two numbers
Use FIFO to write a clientserver application. The client will receive two integer numbers
from the command line and send the two numbers to the server. Once received these two
numbers, the server will send their sum to the client then terminate. The client program
will terminate once received the sum from the server. Both the server and the client
should print out the numbers that it sends and receives.
The communication should be done using two FIFOs. The relative FIFO names without
using should be command line arguments for both the server program and the client
program. The absolute FIFO names should be obtained from the relative ones by prefixing the tmp For example, if sarah is received from command line, then the
corresponding FIFO file should be tmpsarah
Command line arguments of the server: serverclient, clientserver.
Command line arguments of the client: serverclient, clientserver, number
number
The FIFO files are created by the server.
The server program is started first, waiting for the client to connect.
In the laboratory, find a partner to run your programs using the delta server of the CS
school. Run your server program to communicate with your partners client program, and
vice versa. Note that this does not mean that you pass your code to your partner or vice
versa. This does not mean either that you only need to work on the server program or the
client program. Each student should complete both the server program and the client
program.
Your client program and server program will be tested separately on the delta server.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
