GithubHelp home page GithubHelp logo

p2p_file_sharing's Introduction

github

cargo doc --open to generate automatic documentation

Files

File name File content
src/daemon.rs Daemon that executing commands from the client
src/client.rs Console client that sending commands to the daemon
src/lib.rs Contains libraries, constants and user data structures

User documentation, client commands

Command What does this command do
scan Scans the network for files that can be downloaded
ls Show files that can be downloaded
status Show distributed files
share "file_path\file.dat" Share a file with a network
download "save_path" -f FileName Download a downloadable file (path is optional)

Technical documentation

Data types

Data type What is it
enum Command A command that is serialized in the client and sent to the daemon
enum Answer The response to the command is serialized in the daemon and sent to the client
enum FileSizeorInfo Stores an action downloadable peer want to do
enum EnumAnswer If downloadable peer asked file size we answering with size or file not exist
struct DataTemp Contain 2 HashMap: of available for transfer and download files
struct TransferGuard Adding peer to transferring vector when created, and removing peer from vector while destroying
struct FirstRequest Serialized request from daemon which want to get file size or start download a file
struct FileInfo Store which blocks downloadable
struct AnswerToFirstRequest Stores filename and answer to size request

p2p_file_sharing's People

Contributors

neuroborus avatar ksavblik avatar

Watchers

 avatar  avatar

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.