Murray S. Kucherawy
2017-06-09 20:59:20 UTC
In a closed system, before a torrent shuts down I'd like to get a list of
complete seeds that I can see out there. The purpose of this is to decide
if I should stick around and serve others for a while, or if there seem to
be enough seeds already.
As far as I know, the simplest way to do this is to walk the list returned
by get_peer_info() and look for the ones that have the "seed" flag set.
However, it seems as though doing so right as the torrent completes isn't
sufficient because seeds might disconnect between getting to that state and
me walking the peer list. I've tried doing a status post every second and
walking the peer list then, but if the torrent takes less than a second to
complete, the status post may not come in time.
Is there a more reliable way to get this information?
-MSK
complete seeds that I can see out there. The purpose of this is to decide
if I should stick around and serve others for a while, or if there seem to
be enough seeds already.
As far as I know, the simplest way to do this is to walk the list returned
by get_peer_info() and look for the ones that have the "seed" flag set.
However, it seems as though doing so right as the torrent completes isn't
sufficient because seeds might disconnect between getting to that state and
me walking the peer list. I've tried doing a status post every second and
walking the peer list then, but if the torrent takes less than a second to
complete, the status post may not come in time.
Is there a more reliable way to get this information?
-MSK