
URTorrent waits for the download to complete.URTorrent downloads chunks of the file from various peers and uploads chunks that are already available locally.
URTorrent contacts the tracker and gets a list of peers. Pass the port number (on which URTorrent listens) and the name of the metainfo file. To start downloading, a user does the following: Upload the requested chunks to the peers. Start URTorrent (the ‘original’ uploader) which already has the complete file. Generate a metainfo (.torrent) file using the complete file to be served and the URL of the tracker. Start running a tracker (or, more likely, have one running already). To start a URTorrent service, a host goes through the following steps: There might be multiple seeders for the same file, because once a leecher has downloaded the entire file, it will become a seeder. Peers who do not have the entire file yet are called leechers. The original client that had the file to share is called a seeder. Roughly, it contains the file name, keywords (if any), and the URL of a program called a tracker, which is responsible for keeping track of all the peers who are collaborating in downloading UR.mp3.
The precise format of the metainfo file will be described below. The first thing the client needs to do is create a metainfo file containing information about UR.mp3. Let’s say some client has a file to be shared named UR.mp3. We have selectively included information pertinent to this assignment. The official BitTorrent specification is located at the website. In this assignment, you are asked to develop URTorrent, a simplified version of the original BitTorrent protocol.