ELinks 0.18.0
|
#include <piececache.h>
Public Member Functions | |
LIST_HEAD_EL (struct bittorrent_piece_cache_entry) | |
Data Fields | |
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. | |
bittorrent_piece_cache_entry::LIST_HEAD_EL | ( | struct bittorrent_piece_cache_entry | ) |
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.
unsigned int bittorrent_piece_cache_entry::completed |
All blocks was downloaded.
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.
unsigned int bittorrent_piece_cache_entry::locked |
Edge piece from partial downloads.
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.
unsigned int bittorrent_piece_cache_entry::remaining |
Nothing has been even requested.
unsigned int bittorrent_piece_cache_entry::selected |
Piece is part of partial download.