Question: PROGRAM DESCRIPTION In this assignment, you will write a complete C program to support a client/server and pseudo-client/client model) using Linux sockets using the apollo
PROGRAM DESCRIPTION In this assignment, you will write a complete C program to support a client/server and pseudo-client/client model) using Linux sockets using the apollo server instead of the standard Linux CSE machines (i.e., cse01 cse06). The program will consist of a server that will keep a running sum of the integral data being sent by two clients as follows .Server o The server will receive integer values from up to two clients (in any order) and add these values to its current total separate for each client, which the server then returns back to the originating client so that the client is aware of its most up-to-date total. Unlike Minor 6, the values sent in from the clients will be input manually from the keyboard for each client. The server can have, at most, 2 clients connected at one time, though this functionality (i.e., a client being able to send an integral value to the server and the server responding to this request) should still continue even when only 1 client is connected o When the total sum for an individual client reaches a value between 1,024 and 49,151 (the range of ports registered for general use), the server will return this value back to the client as usual, but the server will also send the message PORT" followed by this value to the other client, which will act as a trigger for both clients that the client whose value exceeded the port threshold will then act as a server for the other client to connect to (see Clients section below for details). If only 1 client is connected at the time this threshold is reached, the server shall reset the individual client's current total back to 0 o The server will provide important status updates of messages sent and received such as connection events, each client's running total, and when the port threshold has been reached o The server will continue to "listen" for clients and run indefinitely until manually terminated (using, for example
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
