Ftp file transfer -- 2
Budget: $10 – $30 USD
In this project, you will implement a simple version of ftp client/server software. It consists of two programs: ftpclient and ftpserver. First, ftpserver is started on a computer. It listens on a certain TCP port (such as 4007) and is capable of supporting multiple clients with different threads. Then, two ftpclients are executed on the same computer where the server runs; the server’s port number are supplied in the command line, for example, “ftpclient 4007”. The user can issue a command at each of the two clients: “get <filename>”, which is to retrieve a file from the server, or “upload < filename>”, which is to upload a file to the server.
Testing is carried out in the following sequence (a) client 1 will get downloadTestFile1.pptx from the server and write the file to the local disk as newDownloadTestFile1.pptx, (b) client 2 will get downloadTestFile2.pptx from the server and write the file to the local disk as newDownloadTestFile2.pptx, (c) client 1 wil upload uploadTestFile1.pptx to the server, which will write the file to its local disk as newUploadTestFile1.pptx, and (d) client 2 will upload uploadTestFile2.pptx to the server, which will write the file to its local disk as newUploadTestFile2.pptx. The reason to change the name of the file with prefix “new” is to allow you to place all files, including the ftpclient, ftpserver and the test files (downloadTestfile1.pptx, downloadTestfile2.pptx, uploadTestfile1.pptx, and uploadTestFile2.pptx), in the same directory. After testing, the newly created files will not overwrite the original test files.
The test files can be found on Canvas. They are the same as chap1.pptx, chap2.pptx, chap3.pptx, and chap5.pptx but under different names, downloadTestFile1.pptx, uploadTestFile1.pptx, downloadTestFile2.pptx, and downloadTestFile2.pptx, respectively. These files are large. You may need to use a loop the break them into smaller segments and send each segment at a time; in this case, you also need a way to inform the end of transmission.
The implementation does not have to conform to the ftp standard.
Testing is carried out in the following sequence (a) client 1 will get downloadTestFile1.pptx from the server and write the file to the local disk as newDownloadTestFile1.pptx, (b) client 2 will get downloadTestFile2.pptx from the server and write the file to the local disk as newDownloadTestFile2.pptx, (c) client 1 wil upload uploadTestFile1.pptx to the server, which will write the file to its local disk as newUploadTestFile1.pptx, and (d) client 2 will upload uploadTestFile2.pptx to the server, which will write the file to its local disk as newUploadTestFile2.pptx. The reason to change the name of the file with prefix “new” is to allow you to place all files, including the ftpclient, ftpserver and the test files (downloadTestfile1.pptx, downloadTestfile2.pptx, uploadTestfile1.pptx, and uploadTestFile2.pptx), in the same directory. After testing, the newly created files will not overwrite the original test files.
The test files can be found on Canvas. They are the same as chap1.pptx, chap2.pptx, chap3.pptx, and chap5.pptx but under different names, downloadTestFile1.pptx, uploadTestFile1.pptx, downloadTestFile2.pptx, and downloadTestFile2.pptx, respectively. These files are large. You may need to use a loop the break them into smaller segments and send each segment at a time; in this case, you also need a way to inform the end of transmission.
The implementation does not have to conform to the ftp standard.
Related categories:
Business, Accounting, Human Resources & Legal
Python
Computer Science
Digital Networking