Question
CS 372 Introduction to Computer Networks Programming Assignment #2 Submit the source files, Makefile, and README in a .zip file Objectives: 1. Implement 2-connection client-server
CS 372 Introduction to Computer Networks Programming Assignment #2 Submit the source files, Makefile, and README in a .zip file
Objectives: 1. Implement 2-connection client-server network application 2. Practice using the sockets API 3. Refresh programming skills
The Program: 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 of your programs must accomplish the following tasks: 1. ftserver starts on Host A, and validates command-line parameters (
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
Options: There are many possibilities for extra credit. All extra credit must be documented and referenced in your program description and README.txt to receive any credit. Here are a few ideas to get you started: Make your server multi-threaded. Implement username/password access to the server. Allow client to change directory on the server. Transfer files additional to text files (e.g. binary files) (a text file with a non-.txt extension doesnt count. etc
Notes: Beej's Guide will be helpful. It has many things youll need for this assignment. Don't hard-code the port numbers Dont use the well-known FTP port numbers, or 30021 or 30020, as these will be probably in use (by network services or other students). We will test your system with text files only (unless your README specifies additional file types), one very large and one small. If you implement extra credit features, be sure to fully describe those features, and how to use them, in your README, or you wont receive any extra credit. Programs will be accepted up to 48 hours late with a 10% penalty per 24-hour period.
Example Execution:
Server (Flip 1) | Client (Flip 2) | ||
Input to Console | Output | Input to Console | Output |
> ftserver 30021 | |||
Server open on 30021 | |||
> ftclient flip1 30021 l 30020 | |||
Connection from flip2. | |||
List directory requested on port 30020. | |||
Sending directory contents to flip2:30020 | |||
Receiving directory structure from flip1:30020 | |||
shortfile.txt longfile.txt | |||
> ftclient flip1 30021 g shortfile.txt 30020 | |||
Connection from flip2. | |||
File shortfile.txt requested on port 30020. | |||
Sending shortfile.txt to flip2:30020 | |||
Receiving shortfile.txt from flip1:30020 | |||
File transfer complete. | |||
> ftclient flip1 30021 g longfileee.txt 30020 | |||
Connection from flip2. | |||
File longfileee.txt requested on port 30020. | |||
File not found. Sending error message to flip2:30021 | |||
flip1:30021 says FILE NOT FOUND | |||
> | |||
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started