Question: PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU OR GIVE OU A DISLIKE #2 In this project, you will program the simple message

PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU OR GIVE OU A DISLIKEPLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU OR GIVE

#2 In this project, you will program the simple message (a string) transmission between a client and a server on the same machine. The client will send a string to the server. The server replies with the reverse of the string. For example: when client sends "abcde", Server replies with "edcba". The following steps shall be implemented: 1. The client connects to the server through a TCP socket. 2. The client prompts the user to input a message, ending by the 'enter' sign. "Please enter the message: [your input string will be here)" 3. The client sends the string to the server process by prompting the user "Sending to SERVER:[your input string should be displayed here)". 4. The server process displays the received string by prompting the user "Server Received: (the string from the client should be displayed here)". 5. The server replies the result (reversed string) to the client. 6. The client prompts the user to display the result. "Received from SERVER:[the result should be displayed here)". 7. Repeat steps 2 to 6 twice, each time with a different string. 8. Close the TCP socket between the sender and receiver. Assume the server will only receive strings from a single client. Choose a server port number greater than 1023 (to be safe, choose a server port number larger than 5000). For testing, you can run server and client on the same machine. In that case, set the IP address of the server to be 127.0.0.1 as one of the client inputs. Make sure you close every socket that you use in your program. Please refer to the client and server codes using socket in Figure 6-6 on page 504 and 505 in the textbook. Write your own program in C. You will need use the C system calls for socket programming, including socket(), bind(), listen(), accept(), connect(). and close(). In your report, please provide: 1. The source codes of your client and server programs. Please name your client code as FirstName_LastName_client.c and name your server code as FirstName LastName_server.c. The input to the client code should have IP address (127.0.0.1) and the port number at the server. There are no other inputs to the server code. Note that you need to start server first. 2. The screen shot of your sender screen with the displays of two input messages. 3. The screen shot of your receiver screen with the displays of two input messages. As usual, zip the files for 1, 2, and 3 for submission. The following is one example from my desktop: aanbantu fik at viru Search Termiral Hal 20%ubuntu: sockstas. 'serve Server Reed: Trynicatine Erubuntu: Fic Edit View Search Terri Hit zenbubuntu: - cocket25 leert 27.0.0.1 10913 Plex until the wall Sencing to SERVER: hello Perrin TR SIRAR: Clich Please enter the resca: Data coruncation ning te SERWER: rts Ernisation - FRXSERER ruitecinin 450 Please enter the ressagt 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!