GithubHelp home page GithubHelp logo

p2pfilesharingsystem's Introduction

Computer Networks Project

Peer-To-Peer file sharing system with Tkinter for GUI, sockets, threads etc.

How to run main redirecting server [FT]:

python3 FT_server.py

How to run a client:

python client.py

Here is the description of the used protocol:

The IP address of FT and the port number on which the application is running should be public, i.e., users should know the IP address and port number of FT.

  • When a peer A connects to FT, A should automatically send information about its shared files (up to 5 files) as a list of records to FT in the following format: <file name, file type (e.g., text, jpg, etc), file size, file last modified date (DD/MM/YY), IP address, port number>. A should send “HELLO” and receive “HI” before sending the information.
  • If A does not send any file information to FT while joing the system, i.e., if A does not share any file, then FT should not accept A. FT should not respond to A.
  • Only accepted peers should be able to use the services offered by this system.
  • When A wants to download a file with the name “File Name”, A requests the file from FT by sending “SEARCH: ” + “File Name”.
  • When FT receives “SEARCH: ” + “File Name”, it tries to find the file in a hash table where ‘key’ is filename and ‘value’ is a list which contains records of this format: <file type, file size, file last modified date (DD/MM/YY), IP address, port number>. – If FT finds the file, it should send “FOUND: ” + list of records. – If FT does not find the file, it should send “NOT FOUND”.
  • After receiving a list of records, A should choose one of the peers (records) from the list, say B, and connect to B (using IP and port number) to request and download the file. For that A should send “DOWNLOAD: ” + “FileName, type, size” to B.
  • When B receives a “DOWNLOAD” message from A, it should send “FILE: ”+file to A.
  • When A wants to leave the system, A should notify FT about this so that FT can update the list of online users. A should send “BYE” to FT to do so.

p2pfilesharingsystem's People

Contributors

sadda11asm avatar camelocadelo avatar

Watchers

 avatar

Forkers

subham123456789

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.