3 ms·
https://wiki.theory.org/BitTorrentSpecification https://wiki.theory.org/BitTorrentSpecification is by far the best starting point for the base protocol. Roughly
by jlouis 13y ago
https://wiki.theory.org/BitTorrentSpecification https://wiki.theory.org/BitTorrentSpecification is by far the best starting point for the base protocol. Roughly, you can make certain short-cuts to get running quickly:
Don't cache anything. Write data directly to disk and use seeks. Request pieces at random and don't think about getting the rarest first. Skimp on the choking strategy and don't do anything clever, but pick a simple algorithm. Skip all the extensions until the other parts work.
Get the wire-protocol and bencoder up and running first. Then handle tracking. Then handle connections to peers. Then handle storage.