Question: The assignment 2 it is refering to can be found at this chegg link: https://www.chegg.com/homework-help/questions-and-answers/programming-assignment-c-c-write-simple-http-client-separate-http-server-application-c-usi-q32081459 I used this code for assignment 2. Thank you for
The assignment 2 it is refering to can be found at this chegg link:
https://www.chegg.com/homework-help/questions-and-answers/programming-assignment-c-c-write-simple-http-client-separate-http-server-application-c-usi-q32081459
I used this code for assignment 2.
Thank you for the help!

PROGRAM 3: (8 points) This is an enhancement to the Programming Assignment 2 in C. (not C++) Write a simple HTTP client and a separate HTTP server application in C using the POSIX socket libraries. As soon as the client connects, the client will send 20 bytes of the TCP header simulating the 3-way handshake, the server should respond to it and finally the client completes the handshake. . You must use the POSIX socket functions DO NOT implement the server handling multiple requests at the same time (multi-threading) Implement reasonable output messages that show the raw bytes of the header plus each header field in human readable format - e.g.etc port numbers should be integers, You will need the following fields in the "fake" TCP header: 1. Source TCP port number - Use a C function call to get this 2. Destination TCP port number - The real port you are connecting to 3. Sequence number -Create a random Initial Sequence Number 4. Acknowledgment number - You should use the appropriate value 5. TCP data offset - Make it all zeros for now Reserved data - Make it all zeros for now 7. Control flags flags should be set correctly for the 3-way handshake 8. Window size - Use a reasonable default value e.g. 17520 bytes 9. TCP checksum - Make it all ffffs for now 10. Urgent pointer - Make it all zeros PROGRAM 3: (8 points) This is an enhancement to the Programming Assignment 2 in C. (not C++) Write a simple HTTP client and a separate HTTP server application in C using the POSIX socket libraries. As soon as the client connects, the client will send 20 bytes of the TCP header simulating the 3-way handshake, the server should respond to it and finally the client completes the handshake. . You must use the POSIX socket functions DO NOT implement the server handling multiple requests at the same time (multi-threading) Implement reasonable output messages that show the raw bytes of the header plus each header field in human readable format - e.g.etc port numbers should be integers, You will need the following fields in the "fake" TCP header: 1. Source TCP port number - Use a C function call to get this 2. Destination TCP port number - The real port you are connecting to 3. Sequence number -Create a random Initial Sequence Number 4. Acknowledgment number - You should use the appropriate value 5. TCP data offset - Make it all zeros for now Reserved data - Make it all zeros for now 7. Control flags flags should be set correctly for the 3-way handshake 8. Window size - Use a reasonable default value e.g. 17520 bytes 9. TCP checksum - Make it all ffffs for now 10. Urgent pointer - Make it all zeros
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
