The mp_db_query extension allows
performing of a query in another's peers database. If the peer does not have a local database an
empty query result message will be returned. Queries can be done by info hash and/or
torrent name. Currently the info hash must be empty or a valid 40 characters string.
Wildcards are not allowed within the info hash. The name entry is not restricted.
Furthermore is the number of query results limited.
A query message consists of a bencoded dictionary with two string entries: name and info hash.
The query result message consists of a bencoded dictionary with two string entries (name, info hash) and a dictionary named result. Entry result contains a string named comment and might contain two more list entries, named names and info hashs. These two lists have same number of entries.
The existence of the result entry marks this message as a response.
In the future you might be able to start a search for files and a possible result could be a list of torrents which include matching files. Basically, the functionality to be is not yet determined.
With the current experimental implementation you can search for torrent name for a given info hash or vice versa.
The MooPolice peer exchange is request based. A peer can request a peer list with specific number entries from other peers. Messages
are binary encoded except the peer list itself. There are three
In case of a have no peers response the message is only one byte long (type value 2).
If the message type byte's value is one the following bytes represent a bencoded list. Each list entry is a dictionary that consists of two entries. These entries are ip of type string and port of type integer. Entry ip can be a dotted numbers or a url. This address can be ip v4 or v6.
MooPolice itself will request 20 peers every 5 minutes.
In case there is more than one pex extension available (i.e. ut_pex) only MooPolice's native pex extension MP_peer_exchange is used.
This extension is based on the former libtorrent chat extension (therefore the name). A simple text message can be send to a peer
via this extension.
A chat message consists of a bencoded dictionary which contains a single string entry named msg.