Giter Club home page Giter Club logo

libswift's Introduction

libswift

The multiparty transport protocol.

Description

This is Libswift (aka BitTorrent at the transport layer). Differently from TCP, the protocol does not use the ordered data stream abstraction. Effectively, it splits a file into 1KB packets and sends them around. The secret sauce is Merkle hash trees and binmaps.

Requires libevent-2.0.17 or higher.

See doc/index.html for marketing stuff, ideas and rants, doc/draft-ietf-ppsp-peer-protocol-00.txt for the drafr protocol specification, and *.cpp files for the actual code.

Usage

swift.cpp is the main exec file; it may be run as e.g.

$ ./swift -t node300.das2.ewi.tudelft.nl:20000 -h \
d1502706c46779d361a1d562a10da0a45c4c40e5 -f \
trailer.ogg

...to retrieve video and save it to a file.

Alternatively, you might play with the HTTP gateway, the preliminary version. First, run the seeder-tracker:

$ ./swift -f ~/Downloads/big_buck_bunny_480p_stereo.ogg -l 0.0.0.0:20000
Root hash: 7c462ad1d980ba44ab4b819e29004eb0bf6e6d5f

...then you may try running the swift-HTTP gateway...

$ ./swift -t 127.0.0.1:20000 -g 0.0.0.0:8080 -w

...and finally you may point your browser at the gateway...

http://127.0.0.1:8080/7c462ad1d980ba44ab4b819e29004eb0bf6e6d5f

If you use an HTML5 browser (Chrome preferred), you are likely to see the bunny trailer at this point...

libswift's People

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.