Question: DO IN UNIX/LINUX a. Design and implement the Server (a3pl Server 1.c) and the Client#1 (a3pl Client 1.c). The concurrent server is up and listening.
DO IN UNIX/LINUX

a. Design and implement the Server (a3pl Server 1.c) and the Client#1 (a3pl Client 1.c). The concurrent server is up and listening. The Client#1 connects to the server to do each command from client in a loop. The server (when it starts) takes one argument (its port number) to bind and listen for client's connection. The client (when it starts) takes two arguments (IP address and Port number of the server) to be used to connect. b. The Client#1 is up and running a loop to: (1) send a command to the server, (2) wait and receive the result of the command from the server, (3) display the result, (4) go into a sleep for 3 seconds, and then (5) wake up, go back in the loop. For this example, the Client# 1 keeps one command ("date") each time The Client #1 sends a command string (e.g., "is") to the server to be processed. Once the Client #1 is connected to the server, the server creates a worker thread (Thread #1). The server receives a command string to be run and sends its result back to the client. The server lets a worker thread receive (read via socket) the command string from the client (e.g., "date"). Then it runs the command and sends the result back to the client. c. The Client #1 then receives the result from the server and displays it to the console. In addition, the client outputs (appends) the result to a log file (a3Clientl.log). The log file of the client is opened in the beginning of the client program, writing each result from the server, with a proper heading. The log file is closed at the end of the client program, and then the client displays a message (with a time of the day and its process ID or thread ID) to the console d. Then the Client#1 goes into sleep for 3 seconds. And then the client wakes up and displays a message (with a time of the day and its process ID or thread ID) to the console. Then the client repeats this cycle until it is killed by the user (via CTRL+C or kill command) e. In addition, the Server opens its log file (a3p1Server.log) to be shared by all of its threads. Then each server's thread displays a message (with a time of the day with PID and its thread ID) to the console saying that it is going to process a client's request with a proper heading (Process ID or Thread ID with the time of day). f. Let both client and server run together for 10 to 30 seconds. Then the client sends "exit" to terminate its request and to terminate itself (or you can kill it manually). The server will be killed manually by you after the client is a. Design and implement the Server (a3pl Server 1.c) and the Client#1 (a3pl Client 1.c). The concurrent server is up and listening. The Client#1 connects to the server to do each command from client in a loop. The server (when it starts) takes one argument (its port number) to bind and listen for client's connection. The client (when it starts) takes two arguments (IP address and Port number of the server) to be used to connect. b. The Client#1 is up and running a loop to: (1) send a command to the server, (2) wait and receive the result of the command from the server, (3) display the result, (4) go into a sleep for 3 seconds, and then (5) wake up, go back in the loop. For this example, the Client# 1 keeps one command ("date") each time The Client #1 sends a command string (e.g., "is") to the server to be processed. Once the Client #1 is connected to the server, the server creates a worker thread (Thread #1). The server receives a command string to be run and sends its result back to the client. The server lets a worker thread receive (read via socket) the command string from the client (e.g., "date"). Then it runs the command and sends the result back to the client. c. The Client #1 then receives the result from the server and displays it to the console. In addition, the client outputs (appends) the result to a log file (a3Clientl.log). The log file of the client is opened in the beginning of the client program, writing each result from the server, with a proper heading. The log file is closed at the end of the client program, and then the client displays a message (with a time of the day and its process ID or thread ID) to the console d. Then the Client#1 goes into sleep for 3 seconds. And then the client wakes up and displays a message (with a time of the day and its process ID or thread ID) to the console. Then the client repeats this cycle until it is killed by the user (via CTRL+C or kill command) e. In addition, the Server opens its log file (a3p1Server.log) to be shared by all of its threads. Then each server's thread displays a message (with a time of the day with PID and its thread ID) to the console saying that it is going to process a client's request with a proper heading (Process ID or Thread ID with the time of day). f. Let both client and server run together for 10 to 30 seconds. Then the client sends "exit" to terminate its request and to terminate itself (or you can kill it manually). The server will be killed manually by you after the client is
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
