Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use FIFO to write a client / server application with server.c and client.c . This application performs a simple instant messaging between two users on
Use FIFO to write a clientserver application with server.c and client.c This application
performs a simple instant messaging between two users on the same machine. The FIFO
names should be command line arguments. The messages should be displayed in a well
formatted way to show the server messages and the client messages sidebyside, on both
the server's end and the client's end. See the sample run for example.
The server program should be started first. The user on the client side can decide to quit
the conversation by typing CtrlC When the client stops the conversation, only the client
program is terminated. The server program will wait for the next connection from client.
The server will terminate if CtrlC is received from the user. When the server is
terminated, the client is also terminated.
Sample run:
server fifoi fifo
Waiting for connection
my messages server
What?
What did you say?
Client left.
received messages client
Salut!
Waiting for connection
my messages server
Welcome!
Im typing ControlCC
received messages client
Im back!
COMP System Programming
client fifoi fifo
Connected.
my messages client
Salut!
Dr Chen
Im typing ControlCC
client fifol fifo
Connected.
my messages client
Im back!
Terminated:
received messages server
What?
What did you say?
received messages server
Welcome!
Submission: a zipped file named firstnamelastname.zip containing server.c and client.c
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