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, 21.06.2019 19:30
Asalesman at a high end computer security firm want to sell you a proactive cover for your passport, which contains an rfid tag inside storing your sensitive information. the salesperson's solution cost only $79.99 and protects your passport from being read via radio waves while it is in your pocket. explain how you can achieve the same thing under $3.00
Answers: 3
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 24.06.2019 01:00
What shows the web address of the page that is currently displayed in the workspace? status window toolbar location bar internet box
Answers: 1
You know the right answer?
Design and implement the following tasks. first, name your server program: a4server2.c (or a4server...
Questions
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Biology, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Social Studies, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
English, 09.09.2020 17:01
question
Chemistry, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Mathematics, 09.09.2020 17:01
question
Social Studies, 09.09.2020 17:01
question
Social Studies, 09.09.2020 17:01
Questions on the website: 13722367