

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


For this project, you’re required to modify the example Fig. 6-6 in textbook to implement a simple File Transfer Server. (Only for downloading files) The source code of Fig. 6-6 in textbook has been put under course directory (located at bert.cs.uic.edu). You could directly copy it to your home directory from ~i450/Project1/project1.tar. Then make necessary modification to implement following functionalities: a. After start your client program, it can successfully connect to the server and will be waiting for future instructions from users. The way to start your client and connect to the server should be like: client hostname port and the way to start server is: server port b. The client should be able to download a file from the server each time. The command format for downloading is: get filename. c. After successfully downloading a file from server, the client should be waiting for next instruction from user, like getting next file or list the file on server, or exit the program. d. The client should be able to send requests to server to list all the files located in the current directory of server and display them on the client machine. The command format is: lsFile. e. If the file requested by client doesn’t exist on the server, an error message should be displayed on client machine indicating the non-exist file. And then wait for next instruction. f. The server should support multiple simultaneous connections from different clients. You may implement this on server part by using multi-threads or multi-processes. g. The command for user to stop session with the server and the client program is: exit h. Whenever a new client connects to the server, the information about client should be displayed on server machine. (the client’s IP and Port number should be displayed) i. There may be some other pieces of information being displayed on client machines to indicate the whole progress, like successfully connecting to the server and completion of transferring files. This is not mandatory. It’s just used for your program to be easily evaluated then.
a. This is an individual project. You’re not allowed to share code with each other, except the common parts from examples. b. The programming language is only C/C++. c. The port number used for server could be designated by using 10000 plus last four digits of your UIN. d. Your program will be compiled and run on CS lab machines. Your submission should include a Makefile and all that will be required to compile your program is typing “make”. The generated executable files are server and client. Submissions which can’t be unsuccessfully compiled will get 0 point. e. When testing your program, please don’t run more than 3 clients to conserve system resource. f. You could create a directory named project1 to contain all the files (including source code and Makefile). g. The way you submit your program is using command turnin. The format for using it is: turnin –c cs450 –p project1 project h. In the comments, all assumptions you made should be stated clearly and given an explanation. i. Besides this, please submit a hardcopy of your code in Friday’s class (Oct. 17th), and another hardcopy should be left in TA’s (Wenyuan Fei) mail box in 905 SEO no later than the next day after the project is due. Don’t forget to put your name on it.