Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2 (12,5 points) - Write the client and server side programs in C of an echo service, i.e., a service which returns back whatever it

image text in transcribed

Q2 (12,5 points) - Write the client and server side programs in C of an echo service, i.e., a service which returns back whatever it receives from clients back to them. The clients and server should communicate over the sockets mechanism. The server side should be a multi-threaded application which is capable of servicing multiple clients concurrently in parallel. In addition to the message sent back to its clients, your server should indicate to its client the order of him among all the clients he has served since startup. That is, the first client asked for the service should receive, in addition to the echo of his message, the information that he is the first client so far, the second client should receive the information that he is the second client so far, and so on. You can order the clients according to the time when their first connection requests have been received and accepted by the server. If the same client asks for the same service at some later time once again, the information he received should be the same as before, i., e., you should not increment the order of the same client if he wants to get the service some time later. You can check for the identity of your clients based on their IP address, and port number combinations. Only different clients should get increasing order numbers, the same client can not be both, for example, the third, and the tenth requestor during a single run of the server

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

Step: 3

blur-text-image

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

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

1. What is the chief role of the operations manager?

Answered: 1 week ago

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago