diff --git a/docs/manual.rst b/docs/manual.rst index 79bf363d9..47294828a 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -1922,6 +1922,7 @@ Its declaration looks like this:: enum deadline_flags { alert_when_available = 1 }; void set_piece_deadline(int index, time_duration deadline, int flags = 0) const; + void piece_availability(std::vector& avail) const; void piece_priority(int index, int priority) const; int piece_priority(int index) const; void prioritize_pieces(std::vector const& pieces) const; @@ -1997,6 +1998,23 @@ In the python binding for this function, the ``deadline`` is the number of milli as an integer. +piece_availability() +-------------------- + + :: + + void piece_availability(std::vector& avail) const; + +Fills the specified ``std::vector`` with the availability for each +piece in this torrent. libtorrent does not keep track of availability for +seeds, so if the torrent is seeding the availability for all pieces is +reported as 0. + +The piece availability is the number of peers that we are connected that has +advertized having a particular piece. This is the information that libtorrent +uses in order to prefer picking rare pieces. + + piece_priority() prioritize_pieces() piece_priorities() -------------------------------------------------------