sponsy/P2P — pull request #2 by atmouse (2011-10-12 19:12:01+00:00)
Title: file uploading/downloading

A client can now successfully download a file from a second client, and vice versa.

IMPORTANT CHANGES:
Because clients often have trouble binding to their socket on startup, the Downloader and Uploader class's
port numbers have been changed from 3001 to the fourth commandline argument.

After a file has been uploaded, the uploader class closes its socket, or the file will not finish writing on the
receiving end until the uploading client has been terminated.

IMPORTANT REMARKS:
Each client can successfully download a file ONCE, a second attempt fails.

Do not try to start more than one client on a single pc. This is what we were doing wrong this afternoon.
When starting more than one client on one pc, the second and later clients always fail to create their sockets. I tested this in NARGA.

Do not attempt to download a file to the same folder from which it is being uploaded. The Downloader class
will overwrite the file.

This is a work in progress...