P2P Format

From Phoenix Labs Wiki

Jump to: navigation, search

The P2P format was created for the original PeerGuardian. It is simple and easily editable with any text editor, but is not very compact for transport in bandwidth limited situations. For that it is recommend you use the P2B format.


The format

The P2P format had no official specification, but applications always follow the basic format:

Some organization:
Another organization:

The encoding of a P2P list is not formally defined, but many parsers assume they are ASCII or ISO-8859-1. PeerGuardian 2 assumes P2P lists are encoded in ISO-8859-1 if they do not begin with a UTF-8 BOM.

PeerGuardian 2 also treats lines which start with a # as a single-line comment and ignores empty lines, like so:

# This is a comment
Some organization:
Another organization:

# This is another comment
Yet another organization:
And another:

Developing with P2P

A cross-platform C++ library for working with the P2P format is freely available from Phoenix Labs.

See also

External links

Personal tools