I am creating a basic file transfer system to test out. If this works well, will be following up with a bigger/more in depth project. FYI: ftserver has to be in C and ftclient in java or python.
Design and implement a simple file transfer system, i.e., create a file transfer server and a file transfer client. Write the ftserver and the ftclient programs. The final version must do:
1. ftserver starts on Host A, and validates command-line parameters ().
2. ftserver waits on for a client request.
3. ftclient starts on Host B, and validates any pertinent command-line parameters.
4. ftserver and ftclient establish a TCP control connection on . (call this connection P)
5. ftserver waits on connection P for ftclient to send a command.
6. ftclient sends a command (-l (list) or -g (get)) on connection P.
7. ftserver receives command on connection P.
If ftclient sent an invalid command
- ftserver sends an error message to ftclient on connection P, and ftclient displays the message on-screen.
otherwise, ftserver initiates a TCP data connection with ftclient on . (Call this connection Q)
- If ftclient has sent the -l command, ftserver sends its directory to ftclient on connection Q, and ftclient displays the directory on-screen.
- If ftclient has sent -g , ftserver validates FILENAME, and either
- sends the contents of FILENAME on connection Q. ftclient saves the file in the current default directory (handling 'duplicate file name' error if necessary), and displays a 'transfer complete' message on-screen
- sends an appropriate error message ("File not found", etc.) to ftclient on connection P, and ftclient displays the message on-screen.
- ftserver closes connection Q (don't leave open sockets!).
8. ftclient closes connection P (don't leave open sockets!) and terminates.
9. ftserver repeats from 2 (above) until terminated by a supervisor (SIGINT).
What I need:
- ftserver must be written in C.
- ftclient must be written in Java or Python.
- document every 2-3 lines a comment describing what is being done.
- has to run on a unix server.
o I will checkout the program via opening two instances of the shell on different servers and run each program, one to run the server and the second to run the client.
- Don't want any sendfile or predefined functions.
- Has to send a complete text file. Don't worry for an out of memory error.
- Assume same directories in program runs, no need to hardcode any directories.
- I'd like the files sent in a .zip file with a README with instructions to compile and run the server and client.
Skills & Expertise RequiredC
Offer to work on this project closes in 101 days!Submit A Proposal
Share this project with your friends