Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Write a routine that forks. The child asks for input and the parent returns t

ID: 3548392 • Letter: 1

Question

1. Write a routine that forks. The child asks for input and the parent returns the input string in upper case. Use a pipe to communicate among parent and child.

3. Write a socket client and server to do the same function as assignment 2 above. Have the server open a hight numbered port in TCP. The client should connect to the server and send some text information that shows up on the server's screen.

4. Test your client and server in 3 using a different computer (someone else's client connects to your server).


All in C not C++

Explanation / Answer

https://www.dropbox.com/sh/qeitcajtlo9pdeh/C_xosVhl83?lst

obtain the code for (1) from the above link...


----------------------------------------------------------------------------------------------------------------------------------------

https://www.dropbox.com/sh/syw2qjwtuj64tpm/D1wDiBGrMV?lst

obtain the code for (3) from the above link...

This code will also for case (4), when client and server are on different computers..

I have shown the working using the image file as well.

when client resides on some other computer

replace the line "./client 127.0.0.1 12345" with "./client ip_address 12345"

where "ip_address" is the IP address of the computer on which the serve resides and 12345 is the port number.


Please comment in case of any doubt, I am always ready to help.