How does a peer know that another peer is a seed?

When a peer connects to another partner that has all the parts, how does the recognizing partner know that what it is connected to is actually a seed (and has all parts)? Are there messages sent between them?

In clients such as uTorrent, the expert seems to be aware of the download progress of each peer to which he has connected. How is all this known? Does a peer get that another peer is a seed if the progress is 100% or for this there are specific messages? What parts of the protocol deal with all this?

+4
source share
3 answers

The peer knows if the other peer is a seed if the other peer is:

  • sends a fully completed bitfield, indicating that it has all the parts in the torrent. - BEP3

  • sends incomplete bitfield, and then all messages havefor the remaining parts that he did not have from the very beginning. (It can either be that he constantly downloads and completes the torrent, or that he sends lazy bitfield.) - BEP3

  • sends a message have allaccording to Fast Extension - BEP6

  • sends upload only=1in accordance with the Extension for partial seeds - BEP21
    Partial seed means that the peer has downloaded only parts of the torrent and no longer wants to download and visits what it has.

, have.

.

+3

, bitfield, , . have , ( , , ).

Fast Extension, have all have none.

Superseeding, , , . , , , , , .

. have x, , x, , x ( , ). , , , , Superseeding.

+1

:

The peer protocol refers to file fragments by index, as described in the metainfo file, starting from zero. When a peer finishes loading a piece and checks for hash matching, he announces that he has this piece for all of his peers.

Then, yes, messages are exchanged by peers so that they can know what is available for download. The "part" protocol that deals with this is the Peer protocol.

0
source

All Articles