How Torrent Clients Announce Transition to Seeder
When a BitTorrent client finishes downloading the final piece of a
file, it transitions from a leech to a seeder through a combination of
peer-wire protocol messages, connection management, and tracker updates.
To notify currently connected peers of its new status, the client
broadcasts a final piece confirmation (HAVE message),
updates its internal state, terminates unnecessary connections with
other seeders, and reports the completion event to the tracker.
Broadcasting the
Final Piece (HAVE Message)
Under the standard BitTorrent protocol, clients do not send a single explicit “I am now a seeder” message over an existing peer connection. Instead, the transition occurs incrementally through piece management:
- Piece Verification: Once the client downloads and
verifies the cryptographic hash of the final missing piece, it
constructs a standard
HAVEmessage (Message ID4). - Broadcast to Peers: The client transmits this
HAVEmessage, containing the index of the last piece, to all currently connected peers. - Peer Bitfield Update: Connected peers receive the message and update their internal representation of the client’s bitfield. Because the peer now sees that the client possesses every piece of the torrent, the peer recognizes that the client has become a full seeder.
Terminating Redundant Seeder-to-Seeder Connections
Because seeders only upload data and do not download, two seeders have nothing to share with each other. Once the transition to a seeder is complete:
- The newly converted seeder identifies any connected peers that also possess 100% of the file.
- The client systematically closes these TCP connections. Terminating connections with other seeders frees up network sockets, bandwidth, and upload slots exclusively for leechers who still require pieces.
Tracker Announcement
(event=completed)
In addition to communicating directly with connected peers over the peer-wire protocol, the client notifies the central tracker (or DHT network):
- The Announce Request: The client sends an immediate
announce request containing the parameter
event=completed. - Swarm Metrics Update: The tracker adjusts the swarm statistics by decrementing the leecher count and incrementing the seeder count.
- New Peer Lists: The tracker stops providing other seeders’ IP addresses to this client and begins distributing this client’s IP to new leechers entering the swarm.
Extension Protocols
If the client and its peers support the BitTorrent Fast Extension
(BEP 6), seeders connecting to the swarm anew can use the
HAVE ALL message during the initial handshake. However, for
active connections transitioning mid-transfer, the standard
HAVE message for the final piece remains the primary
trigger that signals completion to the swarm.