1libswift
2========
3
4The multiparty transport protocol.
5
6## Description ##
7This is Libswift (aka BitTorrent at the transport layer).
8Differently from TCP, the protocol does not use the ordered data stream abstraction.
9Effectively, it splits a file into 1KB packets and sends them around.
10The secret sauce is Merkle hash trees and binmaps.
11
12Requires libevent-2.0.17 or higher.
13
14See [doc/index.html][1] for marketing stuff, ideas and rants,
15[doc/draft-ietf-ppsp-peer-protocol-00.txt][2] for the drafr protocol specification,
16and `*.cpp` files for the actual code.
17
18[1]: http://htmlpreview.github.com/?https://github.com/libswift/libswift/blob/master/doc/index.html
19[2]: https://raw.github.com/libswift/libswift/master/doc/draft-ietf-ppsp-peer-protocol-00.txt
20
21## Usage ##
22
23`swift.cpp` is the main exec file; it may be run as e.g.
24
25    $ ./swift -t node300.das2.ewi.tudelft.nl:20000 -h \
26    d1502706c46779d361a1d562a10da0a45c4c40e5 -f \
27    trailer.ogg
28
29...to retrieve video and save it to a file.
30
31Alternatively, you might play with the HTTP gateway, the preliminary
32version. First, run the seeder-tracker:
33
34    $ ./swift -f ~/Downloads/big_buck_bunny_480p_stereo.ogg -l 0.0.0.0:20000
35    Root hash: 7c462ad1d980ba44ab4b819e29004eb0bf6e6d5f
36
37...then you may try running the swift-HTTP gateway...
38
39    $ ./swift -t 127.0.0.1:20000 -g 0.0.0.0:8080 -w
40
41...and finally you may point your browser at the gateway...
42
43    http://127.0.0.1:8080/7c462ad1d980ba44ab4b819e29004eb0bf6e6d5f
44
45If you use an HTML5 browser (Chrome preferred),
46you are likely to see the bunny trailer at this point...
47