HTTPS SSH

RE203 - Network Project (S8) : P2P File Sharing

Beer2Beer Team

Tom AGRY, Guillaume BEA, Clara BROC, Théo CHASSAIGNE & Pierre ROUX

Coding convention

We'll use C++ 11 for the STL lib, and syntaxic sugar. As it's a network project, we'll only use pointers and structs.

Packet format

Tracker to Peer

< announce listen <port> seed [<file1> <length1> <piece_size1> <key1> ...] leech [<key2> ...]
> ok

< look [<criterion1> ...]
> list [<file1> <length1> <piece_size1> <key1> ...]

< getfile <key>
> peers <key> [<ip1>:<port1> ...]

Peer to Peer

< intersted <key>
> have <key> <buffer_map>

< getpieces <key> [<index1> ...]
> data <key> [<index1>:<piece> ...]

< have <key> <buffer_map>
> have <key> <buffer_map>

< update seed [<key1> ...] leech [<key2> ...]
> ok

Misc

Config file

The configuration file must contain: - Connection information - Maximum pairs - Maximum message size (the 'getpieces' command must request less than the maximum size)

Periodic calls

- have
- update seed