effusion v0.1.0 Effusion.BTP.Torrent View Source

Functions for assembling the file that results from a torrent download.

Link to this section Summary

Functions

Add a block of data to torrent

Get the bitfield value representing the torrent’s finished pieces

Get the set of blocks cached by this torrent

Get the number of bytes that have been added to this torrent

Get the number of bytes still necessary for this download to be finished

Check if the torrent has cached or written all of the pieces it needs to be complete

Get the pieces that have been verified and written to disk

Create a map that describes a torrent download

Get the pieces that have been verified but not yet written to disk

Remove a piece from the torrent

Get the pieces that have been verified and written to disk

Link to this section Functions

Link to this function add_block(torrent, block) View Source

Add a block of data to torrent.

If the addition of the block finishes a piece, the piece will then be verified and moved to the :pieces set.

Get the bitfield value representing the torrent’s finished pieces.

This bitfield includes both in-memory as well as on-disk pieces.

Get the set of blocks cached by this torrent.

Link to this function bytes_completed(torrent) View Source

Get the number of bytes that have been added to this torrent.

This includes bytes in blocks that have not yet been verified.

Get the number of bytes still necessary for this download to be finished.

Check if the torrent has cached or written all of the pieces it needs to be complete.

Link to this function finished_pieces(torrent) View Source

Get the pieces that have been verified and written to disk.

Create a map that describes a torrent download.

Get the pieces that have been verified but not yet written to disk.

Link to this function remove_piece(torrent, piece) View Source

Remove a piece from the torrent.

Get the pieces that have been verified and written to disk.