Provided below are sample solutions for Project 1. These are programs written by some of your colleagues and they have graciously allowed me to realease their code here.
Looking at the code might help you'll get a better understanding of how to use the various socket functions.
There are two sample solutions.
The first solution is by Arthur Chang and illustrates the use of fork() to build a concurrent FTP server. His solution can be found here
The second solution is by Devin Mahoney and illustrates the use of select() to build a concurrent FTP server. His solution can be found here
I would like to thank Arthur and Devin for allowing their solutions to be shared with the class.
The two sets of code are provided *AS IS*. I make no guarantees that they will work for you, do not contain any bugs, have brilliant coding practices etc. The two sets of code passed my automated tests and I looked through them and they seemed okay. Hence, I decided to release them (with the permission of the authors) so that those of you'll who are still unsure as to how to use cetain socket programming functions can look at them and pick up tips/hints.