Question: this needs to be in c Client Side Usage: ./calc_client 2 + 3 calc_client.c main() function: //variables (require other vars. too) client_sent_t msg_send; server_response_t

this needs to be in c Client Side Usage: ./calc_client 2 + 3 calc_client.c main() function: //variables (require other vars. too) client_sent_t msg_send; server_response_t msg_receive; //Validate number of command-line arguments IF (argc != 5) THEN Print usage message Exit with FAILURE //Use 'C's atoi() function to convert command-line args from string (char*) to int msg_send.left_hand = atoi( argv[2] ); //repeat for right_hand operand // PHASE II: calc_client sends message to calc_server MsgSend( coid, &msg_send, sizeof(msg_send), &msg_receive, sizeof(msg_receive)); // Process msg_receive from calc_server
Step by Step Solution
3.34 Rating (154 Votes )
There are 3 Steps involved in it
calcclientc include include include include include include include include include define MAXMSG 100 define SERVERADDR 127001 define CLIENTADDR 12700... View full answer
Get step-by-step solutions from verified subject matter experts
