Transfering Files Across a Hostile Net


Your task to to tranfer a file across a network.  However, this network might drop or corrupt packets.  Never the less you should get the file across.


You might need to wait for either incoming data or a timeout.  Remember that select can take a timeout value, and wait for either the input or the timeout whichever comes first.

You must use my SendTo command to send data.  It drops and corrupts packets for you :-)  You must use UDP.

If you need a refresher on UDP, there is a basic UDP chat client and server.

If you need to learn how to get a directory listing, please check out opendir.cc.

My hope is that you will make command line clients.  You should be able to type these things on the command line and have it work.

randy@euclid$ ./client send fred.txt
randy@euclid$ ./client get fred.txt
randy@euclid$ ./client dir
Total is 75,000 points. This program is due Thursday Nov 14th. This is a hard deadline.