Robert Griswold
Computer Programmer
Class Diagram
FTP Client
June 2016
Code Snippet
The
Challenge
With nothing but a C++ library for the TCP (Transmission Control Protocol), our final task in networking class was to create a console based FTP (File Transfer Protocol) client that could connect, login with a password, change directory, list all files in that directory, get a binary file, and put a binary file.
My first step was to design a class diagram for the project. In my report I started with a much simpler design, but later refined it to the one below using several modular classes. Much of the challenge in this project was forming and processing TCP packets in a manner that the external FTP server could understand.
​
The TCPSocket class creates a TCP socket descriptor instance for both the command channel, and each passive mode transmission. The FileIO class similarly creates a file socket descriptor for each file that is sent or received. The FTPInputParser class simply encodes commands from the user into commands to be sent to the FTP server.