Skip to content

sehejjain/DIS-Project

Repository files navigation

P2P File Sharing system

Implemneted the p2p file sharing network in C++

Instructions to run the code:

  1. make to compile the code

  2. ./server to run the central tracking server

  3. In a different terminal window, run './client' to run the first client/peer

  4. In another different terminal window, run './client' to run the second client/peer

In the client side:

  1. first, press 0 to handshake

The other features don't work without handshake so, always send the handshake first

  1. press 1 for registering a file you want to share

  2. press 3 to view all the names of files along with their file ids which are present in the network to download

  3. press 2 to request downlaod and then enter the file id number to downlaod a file

  4. Don't download from the same client which was used to register the file. Download from a different client.

Initiate multiple terminal sessions and register the same file from all of them to create multiple peers ready to share with the same file.

Then try downloading the file from a different client where we did not register the file. This way, we can take advantage of p2p system to download different pieces of the same file from different peers, all at the same time.

The downloaded file is present in the output folder.

Always send the handshake first

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published