Project Introduction

This project creates a peer-to-peer network for file downloading. It resembles some features of Bit-torrent, but much simplified. There are two pieces of software – peer and file owner. The file owner has a file, and it breaks the file into chunks of 100KB, each stored as a separate file. The minimum size of the file is 5 chunks. The file owner listens on a TCP port. It should be designed as a server that can run multiple threads to serve multiple clients simultaneously. Each peer should be able to connect to the file owner to download some chunks. It then should have two threads of control, one acting as a server that uploads the local chunks to another peer (referred to as upload neighbor), and the other acting as a client that downloads chunks from a third peer (referred to as download neighbor). So each peer has two neighbors, one of which will get chunks from this peer and the other will send chunks to this peer.