#include <piececache.h>
|
void * | magic1 |
struct bittorrent_piece_cache_entry * | next |
struct bittorrent_piece_cache_entry * | prev |
void * | magic2 |
uint16_t | rarity |
| Piece rarity index To keep track of the client's view of the swarm in regards to pieces a piece rarity index for neighboring peers is maintained for each piece in the torrent.
|
unsigned int | completed:1 |
| All blocks was downloaded.
|
unsigned int | remaining:1 |
| Nothing has been even requested.
|
unsigned int | locked:1 |
| Edge piece from partial downloads.
|
unsigned int | selected:1 |
| Piece is part of partial download.
|
struct bitfield * | blocks |
| A bitfield of the blocks which remains to be downloaded for this piece.
|
char * | data |
| The data of the piece.
|
◆ blocks
struct bitfield* bittorrent_piece_cache_entry::blocks |
A bitfield of the blocks which remains to be downloaded for this piece.
May be NULL if downloading is not in progress.
◆ completed
unsigned int bittorrent_piece_cache_entry::completed |
All blocks was downloaded.
◆ data
char* bittorrent_piece_cache_entry::data |
The data of the piece.
May be NULL if data has not been downloaded or the piece has been written to disk. XXX: This memory is mmaped using the mem_mmap_*() functions.
◆ locked
unsigned int bittorrent_piece_cache_entry::locked |
Edge piece from partial downloads.
◆ magic1
void* bittorrent_piece_cache_entry::magic1 |
◆ magic2
void* bittorrent_piece_cache_entry::magic2 |
◆ next
◆ prev
◆ rarity
uint16_t bittorrent_piece_cache_entry::rarity |
Piece rarity index To keep track of the client's view of the swarm in regards to pieces a piece rarity index for neighboring peers is maintained for each piece in the torrent.
It keeps track of how many neighboring peers have the piece. The smaller the value the more rare the piece is. The table is updated when the client receives bitfield or have messages. Zero indicates that no neightboring peer has the piece.
◆ remaining
unsigned int bittorrent_piece_cache_entry::remaining |
Nothing has been even requested.
◆ selected
unsigned int bittorrent_piece_cache_entry::selected |
Piece is part of partial download.
The documentation for this struct was generated from the following file: