Question: You are supposed write two separate TCP socket programs that implements both Client / Server parts of a communication such that Client will send two
You are supposed write two separate TCP socket programs that implements both ClientServer parts of a communication such that Client will send two integers and Server will reply with the sum of those integers. In your programs you should clearly indicate the header files that are used
a Write the clientadd.c client program that take the two integers as an argument input to the program or in runtime from the user. After receiving the reply of the Server, Client will show the user final result. You can use sprintf function to convert an integer to a string, and use atoi function to convert a string to an integer.
b Write the serveradd.c server program that replies with the sum of numbers received from the client program. The server process should work in connectionoriented and concurrentserver mode.
c At the terminal, indicate how the two programs are compiled, build and executed
d At the terminal, use netstat to indicate how TCP connection, establishment and termination are achieved. What are the various TCP states?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
