Wiki › Project

Build your own BitTorrent

Project · challenge · 2024

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

In the knowledge graph

Build your own BitTorrent and the 5 things it is linked to. Open any dot for its page, or explore it in the full graph.

When
2023202420252026
Jul 2024 · 17 commits

As data

Everything on this page is read from triples in the knowledge graph. These are the 17 it states about Build your own BitTorrent, and 2 more its ontology implies; the console runs SPARQL over the whole graph, here in your browser.

Download
@prefix id: <https://ask.chaipat.cc/id/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cj: <https://ask.chaipat.cc/ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

id:OwnBitTorrent
    a cj:Project ;
    rdfs:label "Build your own BitTorrent" ;
    cj:description "BitTorrent client that parses .torrent files and downloads from peers (CodeCrafters)." ;
    cj:context id:OpenSource ;
    cj:repository "https://github.com/ape-playground/bittorrent"^^xsd:anyURI ;
    cj:firstCommit "2024-07-02"^^xsd:date ;
    cj:lastCommit "2024-07-05"^^xsd:date ;
    cj:commitCount 17 ;
    cj:kind "challenge" ;
    cj:theme id:ThemeSystems ;
    cj:uses id:CPP ;
    cj:tier 3 ;
    cj:integrates id:CodeCrafters ;
    cj:partOf id:CodeCraftersSeries ;
    cj:article "https://ask.chaipat.cc/wiki/OwnBitTorrent"^^xsd:anyURI ;
    cj:activeIn id:Y2024 ;
    cj:activity _:b116 .