Create a networking application using the socket interface to implement a simple file
transfer service over TCP. In which you must develop both client side and server side code
Structure: Make two directories. One directory stores all files and a make file for the client code. This code will be run on an Ubuntu machine. The other directory stores all files and a make file for the server code. This code will be run on [login to view URL] and can be accessed using putty and credentials that can be given.
Commenting: Properly document code as needed.
Requirements:
• Your client program must compile and run on Ubuntu [login to view URL] LTS. Your server program must compile
and run on paris.cs.wayne.edu. Your client program must be successfully able to connect to and
communicate with your server code on paris.cs.wayne.edu. Due to potential firewall issues depending
upon your Internet Service Provider, you may need to test your code on campus.
• Proper synchronization constructs to prevent different client processes from writing to the same file as
once or to prevent a reader from accessing the file while a writer is writing to a file.
• Your “rudimentary client shell” must support the internal commands described below. Feel free to
include other internal commands if you find this useful for your own testing. You do not need to a fullfledged shell.
• Your submission must include a file named README as a PDF that includes the following information:
o A one line description of each file you are submitting
o Instructions on how to build your program using the Makefiles
o Instructions on how to run your program.
o A description of any problems you had, known bugs or deficiencies.
o A list of all references that you contacted for the program. Include textbooks, man pages,
authorized websites, etc…
o Screenshots of you testing your code.
Client Commands: Write a C/C++ program that supports transferring files to and from the client and server.
Essentially, you need to implement a very rudimentary FTP service. The commands that must be supported by
the client and server include the following:
1. ls- list the file contents of the directory in the server
2. !ls- list the file contents of the directory in the client
3. get filename- transfer a file by the given name from the server to the client
4. put filename- transfer a file by the given name from the client to the server
get and push must allow a user to confirm overwriting a file if the file already exists. This assumes that the file
is not opened by another client for a get or push operation. If so, get or push should fail in these cases and an
appropriate error message should be printed on the client side. get and push are also blocking calls. In other
words, your client program should not do anything else until the command is resolved.
Concurrent File Server: Your file server process must be concurrent, i.e., it supports many clients trying to
connect to it at once. In particular, you need to use pthreads to implement your concurrency. In addition, you
need to use any library of your choice to ensure the integrity of the file chunk being sent over TCP. You may use a hash
function such as MD5, SHA-1, etc… or checksum such as CRC. Regardless of approach taken, make sure you properly cite
your “allowed to borrow” code.
What you can lose points on (not an exhaustive list):
1) Undocumented code.
2) Not checking for errors on system calls.
3) Poor implementations.
4) Not addressing warnings issued by the compiler.
5) Poorly indented code.
6) Include clear cut instructions on how to both:
a. Compile your code
b. Run your code