There is two main protocols, one between cores and one between GUI and core. Both are using protocol buffers for describing the exchanged messages.

Each data sent over the network (using TCP or UDP) are formatted like this :

Where :
  • messageType is a number which determine the message type, more information in the proto files.
  • size is the size of the following serialized message. It may be zero for an empty message.
  • senderId is the sender id.
  • serializedMessage is the data serialized by protocol buffer.

The first three items is the header and is exactly 28 bytes long.

Links to resource (DRAFT)

Proposal 1

Links can be shared across peers. It locates a remote resource like folder or file from a specific peer. It can contain chunk hashes, thus the source peer doesn't need to be online to download a file or a folder.

dl://[<peer name>][:<file id>][:<shared id>/<folder>/<file>]

  • <peer name> : Not required and not used to locate the resource, just an information for the user.
  • <file id> : its the n first group of nibble of the m first chunk where n * m = 40 nibbles (20 octets).
    • 20,87cace382f7371cd3fab3cb0a53b93b7cd9719f6 : 20 chunks of 2 nibbles.
    • 8,05649bcbf065e0d032ada540d4a749d98db055cf : 8 chunks of 5 nibbles.
  • <shared id> : Contains only the beginning of the hash.


  • dl://20,87cace382f7371cd3fab3cb0a53b93b7cd9719f6
  • dl://pierre:20,87cace382f7371cd3fab3cb0a53b93b7cd9719f6
  • dl://pierre:20,87cace382f7371cd3fab3cb0a53b93b7cd9719f6:dac4f75c/my%20movies/LOLCat.avi
  • dl://pierre:dac4f75c/my%20movies/LOLCat.avi
  • dl://pierre:dac4f75c/my%20movies

Proposal 2

This version is much simpler, it doesn't identify the file and contains only the path to the ressource.

dl://<peer name>(<peer ID>)<path>

<path> always starts with a slash. It can be a folder or a file.


  • dl://pierre(d51f479)/my%20movies/LOLCat.avi

Proposal 3

Folders: dl://[<peer name>]:[<peer id>]:(<shared id>|<shared name>)[/<path>]/
Files: dl://<file id>:<file size>:<file name>

<file id> is a hash built from all the chunk hashes. A new field must be added to the IMAlive message to ask if someone know a particular file ID, is someone know the file ID then he replies with a ChunksOwned message (rename the message?) with a field named file_state.


  • dl://Pierre::a%20shared%20folder/my%20movies/
  • dl://Pierre:7c0215d7f758bce8d00ffc467be7d5f5f7c9f929:a%20shared%20folder/my%20movies/
  • dl://Pierre:7c0215d7f758bce8d00ffc467be7d5f5f7c9f929:68181cd1c7495122493b74170f76700ac30c81d1/my%20movies/
  • dl://ea627f2d65c12a78aa5c0c154ba7e187d3fefe80:my%20movies/LOLCat.avi