The IETF PPSP peer protocol reference implementation
C++ Python C JavaScript Shell Perl Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
ext
firefox
java
mfold
scripts
tests
.gitignore
Android.mk
Application.mk
BUGS
ChangeLog
Doxyfile
LICENSE
Makefile
Makefile.mac
NativeLib.cpp
README.md
SConstruct
TODO
address.cpp main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
api.cpp
arno-build.bat
avail.cpp manually adjusted spacing in function declaration/definition May 31, 2014
avail.h manually adjusted spacing in function declaration/definition May 31, 2014
avgspeed.cpp
avgspeed.h
bin.cpp
bin.h
bin_utils.h
binmap.cpp
binmap.h
channel.cpp
cmdgw.cpp fix #52: segfault while downloading many files at the same time Aug 28, 2014
com_tudelft_triblerdroid_swift_NativeLib.h
compat.cpp
compat.h
content.cpp
do_tests.sh
exttrack.cpp
exttrack.h
getopt.c
getopt_long.c
getopt_win.h
hashtree.cpp
hashtree.h
httpgw.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
live.cpp
livehashtree.cpp
livehashtree.h
livesig.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
livesig.h
nat_test.cpp
nat_test_server.c
operational.h main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
send_control.cpp testing with different init values for cwnd Jan 23, 2015
sendrecv.cpp
serialize.h
sha1.cpp
sha1.h
statsgw.cpp
storage.cpp
svn-build-rev.py
svn-revision.h
swarm.url
swarmmanager.cpp
swarmmanager.h
swift.cpp
swift.h
transfer.cpp
win32-build-jni.bat
win32-build.bat
xpimakedist-unix.sh
xpimakedist.bat
zerohashtree.cpp
zerostate.cpp

README.md

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...