A peer from the schema · Torrent Schema

A BitTorrent peer in this tab written from the schema and its codec, with no torrent library: it announces to a WebSocket tracker with a WebRTC offer (webtorrent), takes a seeder's answer, opens the data channel, exchanges handshakes (wire), reads the bitfield, requests one piece — or a whole file, piece by piece — of a known torrent (the txbt4 UTXO snapshot by default) and checks every piece's SHA-1 against the torrent, then plays the file (metainfo). Two implementations that share no code, exchanging a verified piece.

… (a range like 3-5 fetches several)
idle

The exchange

torrent…
our peer id
tracker reply—
answer from—
data channel—
their handshake—
their extended handshake—
bitfield—
blocks—
piece—
Log

Everything on this page comes from codec/ reading schema/. The seeder it meets is whoever the tracker introduces; today that is the utxo-swarm seeder. AGPL-3.0-or-later.