Git Product home page Git Product logo

dis-project's Introduction

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

dis-project's People

Contributors

ganeshrohit avatar sehejjain avatar

Watchers

 avatar

Forkers

ganeshrohit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.