subject
Computers and Technology, 12.12.2019 02:31 lyrique

Design and implement the following tasks. first, name your server program: a4server2.c (or a4server2.cpp) and client program: a4client2.c (or a4client2.cpp).#1. timer to be set for the lifetime of server and client to run. place a timer for each server and client, to terminate itself after 5 minutes of the run.#2. two clients and a log file for each clienteach client (when it starts) takes one more argument to output its result from the server to a log file of each client (instead of the console output).the client (when it starts) takes 5 arguments: (1) the server's ip address, (2) the port number that the server is listening, (3) "your-netid" should be your log-in userid (that is, your utd netid which is used for verification with the server side), (4) client transaction-file name (which contains a list of transaction to be read by the client to be sent to the server to be processed), and (5) client log-file name (where the client outputs: its status, each transaction, and the result of each transaction from the server).to run the client, for example: a4client2 server-ip-address server-port-number your-netid a4client2test1.txt a4client2out1.txt & a4client2 server-ip-address server-port-number your-netid a4client2test2.txt a4client2out2.txt & where "a4client2" is the client program with the arguments. the server-ip-address is the ip address of the server (and you may use 127.0.0.1 if this is the local server). the server-port-number is the port-number of the server is listening. for the first client2 program run, the "a4client2test1.txt" file is the transaction file to be used by the first client2 program). the "a4client2log1.txt" file is the log file of the first client2 program where all the results from the server to this client will be output here. for the second client2 program run, the "a4client2test2.txt" file is the transaction file to be used by the first client2 program). the "a4client2log2.txt" file is the log file of the first client2 program where all the results from the server to this client will be output here. for the program run and test. name your program run-log to be: a4part2runlog. txtyour log file of the program run (of all the session log and history, etc.) should be kept in the same folder for this part and to be submitted to elearning. you may copy and paste your program run & session history (e. g., from the mobaxterm or putty log file).transaction-file (of a client) contains the following test transactions for the client to read it and send it to the server. note that each transaction record has a transaction number (00, 01, 02, …) to be sent to the server. use the following test transaction script for this part.** use the following test script (named as "a4client2test1.txt") as your test transaction file for this part.00 start-of-transaction your-netid01 echo " ** a4client2test1.txt **"; date; whoami; hostname02 ls a4*03 ls -l a4server*04 ls -l a4client*05 end-of-transactionfor the second client2 program, use this transaction file (named "a4client2test2.txt")00 start-of-transaction your-netid01 echo " ** a4client2test2.txt **"; date; whoami; hostname02 ls /etc | wc03 ls /etc | head04 ls05 end-of-transaction// sample code to set a timer to interrupt after some time (to terminate the run).#include #include #include #include #include static int timer_expired = 0; static void alarm_handler(int sig){timer_expired=30; }int main(){// set up a signal hander to call alarm_handler()// when sigalrm is raisedsigaction(sigalrm, & (struct sigaction){.sa_handler = alarm_handler}, null); time_t t; srand((unsigned) time(& t)); timer_expired = 0; alarm(1); // raise sigalrm in 1 secondswhile (! timer_expired) {int s=(rand()%4)+1; printf("%d", s); }return 0; }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
You know the right answer?
Design and implement the following tasks. first, name your server program: a4server2.c (or a4server...
Questions
question
Mathematics, 28.02.2022 08:50
question
Mathematics, 28.02.2022 14:00
question
Mathematics, 28.02.2022 14:00
Questions on the website: 13722362