Question: Socket programming Use C , C++ or Java First create a subdirectory named D1 in home directory. Launch a socket server program that you will
Socket programming Use C , C++ or Java
- First create a subdirectory named D1 in home directory.
- Launch a socket server program that you will write as part of this project on C1. Now, C1 will be listening for incoming connection requests.
- Next, launch the socket client program, also written by you as part of this project, on C2.
- Have the client running on C2 establish a TCP connection with the server running on C1.
- Once the connection is established, have C2 send a message to C1 to create a directory D1copy.
- On receiving the request from C2, the server running on C1 should create a subdirectory D1copy in the home directory and send an ACK to C2.
- Next C2 should send a message to C1 to create the first file named F1.
- C1 must create a file named F1 in subdirectory D1copy and acknowledge the successful creation of the file.
- C2 should read and send contents of file F1 to C2 in successive messages of size 256 bytes
- C1 should append the file contents received from C2 into file F1 in subdirectory D1copy.
- When all contents of file F1 have been successfully sent by C2 and copied by C1, C2 should send a message indicating end of file, and C1 should respond with a message indicating successful creation of the file in subdirectory D1copy.
- Repeat the steps described above to also copy file F2 from subdirectory D1 to D1copy.
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
