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

  1. First create a subdirectory named D1 in home directory.
  2. 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.
  3. Next, launch the socket client program, also written by you as part of this project, on C2.
  4. Have the client running on C2 establish a TCP connection with the server running on C1.
  5. Once the connection is established, have C2 send a message to C1 to create a directory D1copy.
  6. 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.
  7. Next C2 should send a message to C1 to create the first file named F1.
  8. C1 must create a file named F1 in subdirectory D1copy and acknowledge the successful creation of the file.
  9. C2 should read and send contents of file F1 to C2 in successive messages of size 256 bytes
  10. C1 should append the file contents received from C2 into file F1 in subdirectory D1copy.
  11. 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.
  12. 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 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!