clarify documentation around torrent_handle::have_piece() and piece_finished_alert
This commit is contained in:
parent
78aefcc806
commit
b108b1d044
|
@ -868,6 +868,9 @@ TORRENT_VERSION_NAMESPACE_2
|
||||||
// this alert is posted every time a piece completes downloading
|
// this alert is posted every time a piece completes downloading
|
||||||
// and passes the hash check. This alert derives from torrent_alert
|
// and passes the hash check. This alert derives from torrent_alert
|
||||||
// which contains the torrent_handle to the torrent the piece belongs to.
|
// which contains the torrent_handle to the torrent the piece belongs to.
|
||||||
|
// Note that being downloaded and passing the hash check may happen before
|
||||||
|
// the piece is also fully flushed to disk. So torrent_handle::have_piece()
|
||||||
|
// may still return false
|
||||||
struct TORRENT_EXPORT piece_finished_alert final : torrent_alert
|
struct TORRENT_EXPORT piece_finished_alert final : torrent_alert
|
||||||
{
|
{
|
||||||
// internal
|
// internal
|
||||||
|
|
|
@ -287,8 +287,8 @@ namespace aux {
|
||||||
// guaranteed to finish in the same order as you initiated them.
|
// guaranteed to finish in the same order as you initiated them.
|
||||||
void read_piece(piece_index_t piece) const;
|
void read_piece(piece_index_t piece) const;
|
||||||
|
|
||||||
// Returns true if this piece has been completely downloaded, and false
|
// Returns true if this piece has been completely downloaded and written
|
||||||
// otherwise.
|
// to disk, and false otherwise.
|
||||||
bool have_piece(piece_index_t piece) const;
|
bool have_piece(piece_index_t piece) const;
|
||||||
|
|
||||||
#if TORRENT_ABI_VERSION == 1
|
#if TORRENT_ABI_VERSION == 1
|
||||||
|
|
Loading…
Reference in New Issue