Wiki › Project

Build your own BitTorrent

Article
From Chaipat's knowledge graph

Build your own BitTorrent is his C++ solution to CodeCrafters' BitTorrent challenge: a client that downloads a file the way BitTorrent does. The challenge's stages:

  1. decode the .torrent file's bencoded format;
  2. ask the tracker over HTTP which peers have the file;
  3. connect to a peer and exchange messages in BitTorrent's peer protocol, requesting pieces in a pipeline;
  4. check each piece against its hash.

It lives in his ape-playground GitHub organisation.

See also