ELinks 0.20.0
bittorrent_connection Struct Reference

This stores info about an active BitTorrent connection. More...

#include <common.h>

Collaboration diagram for bittorrent_connection:

Public Member Functions

 LIST_HEAD_EL (struct bittorrent_connection)

Data Fields

enum bittorrent_connection_mode mode
struct bittorrent_meta meta
 Static information from the .torrent metafile.
struct bittorrent_tracker_connection tracker
 Dynamic tracker information.
struct bittorrent_piece_cache * cache
 Dynamic tracker information.
struct connection * conn
 Back-reference to the connection the bittorrent connection belongs to.
struct bittorrent_peer_connection list peers
 Active peer list The size is controlled by the protocol.bittorrent.max_active_peers option.
struct bittorrent_peer list peer_pool
 List of information about potential peers.
bittorrent_id_T peer_id
 The peer ID of the client.
uint16_t port
 The port of the listening socket.
timer_id_T timer
 Timer handle for scheduling periodic updating and rating of peer connections.
struct progress upload_progress
 Statistics for the tracker and total progress information for the user interface.
off_t uploaded
off_t downloaded
off_t left
uint32_t complete
 Number of seeders.
uint32_t incomplete
 Number of leechers.
double sharing_rate
struct bittorrent_fetcher * fetch
 Information about any running metainfo file or tracker request.
struct terminal * term
 For notifying on completion.

Detailed Description

This stores info about an active BitTorrent connection.

Note, the list head is used by the handling of the peer-wire listening socket and should only be managed by that.

Member Function Documentation

◆ LIST_HEAD_EL()

bittorrent_connection::LIST_HEAD_EL ( struct bittorrent_connection )

Field Documentation

◆ cache

struct bittorrent_piece_cache* bittorrent_connection::cache

Dynamic tracker information.

◆ complete

uint32_t bittorrent_connection::complete

Number of seeders.

◆ conn

struct connection* bittorrent_connection::conn

Back-reference to the connection the bittorrent connection belongs to.

◆ downloaded

off_t bittorrent_connection::downloaded

◆ fetch

struct bittorrent_fetcher* bittorrent_connection::fetch

Information about any running metainfo file or tracker request.

◆ incomplete

uint32_t bittorrent_connection::incomplete

Number of leechers.

◆ left

off_t bittorrent_connection::left

◆ meta

struct bittorrent_meta bittorrent_connection::meta

Static information from the .torrent metafile.

◆ mode

enum bittorrent_connection_mode bittorrent_connection::mode

◆ peer_id

bittorrent_id_T bittorrent_connection::peer_id

The peer ID of the client.

◆ peer_pool

struct bittorrent_peer list bittorrent_connection::peer_pool

List of information about potential peers.

Todo
TODO: Use hash.

◆ peers

struct bittorrent_peer_connection list bittorrent_connection::peers

Active peer list The size is controlled by the protocol.bittorrent.max_active_peers option.

◆ port

uint16_t bittorrent_connection::port

The port of the listening socket.

◆ sharing_rate

double bittorrent_connection::sharing_rate

◆ term

struct terminal* bittorrent_connection::term

For notifying on completion.

May be NULL.

◆ timer

timer_id_T bittorrent_connection::timer

Timer handle for scheduling periodic updating and rating of peer connections.

◆ tracker

struct bittorrent_tracker_connection bittorrent_connection::tracker

Dynamic tracker information.

◆ upload_progress

struct progress bittorrent_connection::upload_progress

Statistics for the tracker and total progress information for the user interface.

◆ uploaded

off_t bittorrent_connection::uploaded

The documentation for this struct was generated from the following file: