Question: 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

 Q2 (12,5 points) - Write the client and server side programs

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!