MFAshby / pybittorrent

Bittorrent client & tracker, written in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tracker support binary model for returning peers

MFAshby opened this issue · comments

currently supported:
peers: (dictionary model) The value is a list of dictionaries, each with the following keys:
peer id: peer's self-selected ID, as described above for the tracker request (string)
ip: peer's IP address either IPv6 (hexed) or IPv4 (dotted quad) or DNS name (string)
port: peer's port number (integer)

should support:
peers: (binary model) Instead of using the dictionary model described above, the peers value may be a string consisting of multiples of 6 bytes. First 4 bytes are the IP address and last 2 bytes are the port number. All in network (big endian) notation.