Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!


FTA Client and Server Programs SWAP and SDP APIs Worksheet

FTA Client and Server Programs SWAP and SDP APIs Worksheet


Project Requirements

In Part 4 of the project, you must complete the fta_client.c and fta_server.c programs. You can find the source code in the attached zip file below. The source modules will compile and run, but the program functionality is incomplete. To complete these programs, you should implement the following requirements:

  1. The source file name and the destination file name must be given to the client program as arguments.
  2. The client program must transfer the destination file name to the server program before the data transfer.
  3. The FTA client and server programs should only use the SWAP and SDP APIs.
  4. The FTA client and server programs should print your name and student number.

In this assignment you will implement file functions to read and write the input file and the output file respectively. You may wish to review the document entitled “Project Work: Getting Started” and the practice program you were asked to complete at the beginning of the project work: file_copy.c. These activities will help refresh your knowledge of file I/O in the C programming language.

Compile and Test the FTA Client and Server Programs

You will need to test your programs on two terminals, one terminal for the server and another terminal for the client. The port number and IP address for the client should be specified as command line arguments, as well as the names of the input and output file. If the output file does not exist, your program should create the output file.

  1. # Compile the FTA server program$ gcc fta_server.c swap_server.c sdp.c checksum.c -o fta_server
  2. # Run the SWAP server program from the command line; specify the port number on the command line./fta_server 8899
  3. # Compile the SWAP client program$ gcc fta_client.c swap_client.c sdp.c checksum.c -o fta_client
  4. # Run the client program from the command line; specify the IP address, port number and input-filename../fta_client 8899 input-filename

input-filename is a text file that you create to send to the server ; a simple text file with 5 lines is sufficient.

  1. If there are no errors in your implementation of FTA, then fta_client will transfer the input file to fta_server. The fta_server will write the contents of the file sent by fta_client to the output file. For the sake of simplicity, you may hardcode the name of the output file in fta_server.c
  2. After you copy a file using your FTA application, compare the input file to the output file o see if the destination file was copied correctly. Use the diff command to compare the two files.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Writers Hero only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Writers Hero are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Writers Hero is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Writers Hero, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.