Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I need to submit this exercise until the end of the day of the 1 8 th of may. I have to write a

Hello I need to submit this exercise until the end of the day of the 18th of may.
I have to write a code using Language C (Fedora, Linux). If requested I insert also my student number: 1230065.
I also insert this code sent by the professor to check if the code works correctly:
#!/bin/bash
if [[ $# -eq 0]] ; then
echo 'Utilizao:' $0'nmero_de_estudante'
exit 0
fi
CFILES=$(echo -e "ex2_clt.c
ex2_srv.c
ex3_clt.c
ex3_srv.c
ex4_clt.c
ex4_srv.c
ex5_clt.c
ex5_srv.c
ex8a.c
ex8b.c")
OIFS="$IFS"
IFS=$'
'
for file in $CFILES
do
ls ${file} &>/dev/null || echo Ficheiro \"$file\" no encontrado.
execfile=${file%.c}
ls ${execfile} &>/dev/null && ( grep "$1" ${execfile} &>/dev/null || echo Verifique se faz a impresso solicitada em \"${file}\")|| echo Ficheiro \"$execfile\" no encontrado.
done
IFS="$OIF"
Here it is the exercise:
Exercise 2
a) Implement a client/server application using TCP/IP based communication according to the
following protocol:
After establishing the connection to the server, the client sends the contents of the
file whose name is specified as the first argument of the command line.
Upon accepting the connection, the server should write all the received data (i.e.,
the file contents sent by the client) to a temporary file. The temporary file is created
and opened using the following sequence of instructions:
For an example on file manipulation, see the program provided in simple_clone.c.
b) Analogously to I-5), ensure that the server can handle multiple clients simultaneously.
Thank you very much, regards
Lorenzo.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

a. What is the level of education of middle managers?

Answered: 1 week ago

Question

Describe the types of power that effective leaders employ

Answered: 1 week ago

Question

Describe how leadership styles should be adapted to the situation

Answered: 1 week ago