Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is an old question, but perhaps this answer might be useful for others.</p> <blockquote> <ul> <li>Use some application exactly for this. Are there any?</li> </ul> </blockquote> <p>Not that I know of.</p> <blockquote> <ul> <li>Modify a torrent implementation to do what I want. Is anyone familiar with them? Where to start?</li> </ul> </blockquote> <p>I'm only familiar with the BitTornado core (that is used in e.g. ABC). It is written in Python, but it's an architectural mess.</p> <p>However, you could just take any implementation and start stripping it from unnecessary functionality.</p> <blockquote> <ul> <li>Implement a small subset of the protocol. Just periodically ask the peers what they have. Is this feasible or would the program need to support almost the full protocol?</li> </ul> </blockquote> <p>Note that you cannot "ask" a peer what they have. The other peer informs you whenever it wants about the pieces it has (so it's <em>push</em> instead of <em>pull</em>). After the BitTorrent handshake, a peer may send a <a href="http://wiki.theory.org/BitTorrentSpecification#bitfield:_.3Clen.3D0001.2BX.3E.3Cid.3D5.3E.3Cbitfield.3E" rel="nofollow noreferrer">bitfield</a> of pieces it has. Afterwards it may send HAVE messages informing you it has acquired a new piece. Also note that peers may lie about the pieces they have. Examples include <a href="http://wiki.theory.org/BitTorrentSpecification#Super_Seeding" rel="nofollow noreferrer">superseeding peers</a> and freeriding clients like BitThief.</p> <p>If you want to implement a small subset of the protocol, you'd need at the bare minimum implement the BitTorrent handshake message and preferably the extended handshake message. The latter allows you to receive (and send) uTorrent PEX messages. PEX is useful to quickly discover other peers in the swarm.</p> <p>For your statistics gathering purposes, you additionally need to support the bitfield and HAVE messages.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload