*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-08-11 17:22:58 +00:00
parent ef46023326
commit bb25ef1cb6
4 changed files with 21 additions and 0 deletions

View File

@ -1114,6 +1114,8 @@ struct torrent_status
int num_seeds;
float distributed_copies;
int block_size;
};
</pre>
<p><tt class="literal"><span class="pre">progress</span></tt> is a value in the range [0, 1], that represents the progress of the
@ -1187,6 +1189,11 @@ peers this client is connected to. The fractional part tells the share of
pieces that have more copies than the rarest piece(s). For example: 2.5 would
mean that the rarest pieces have only 2 copies among the peers this torrent is
connected to, and that 50% of all the pieces have more than two copies.</p>
<p><tt class="literal"><span class="pre">block_size</span></tt> is the size of a block, in bytes. A block is a sub piece, it
is the number of bytes that each piece request asks for and the number of
bytes that each bit in the <tt class="literal"><span class="pre">partial_piece_info</span></tt>'s bitset represents
(see <a class="reference" href="#get-download-queue">get_download_queue()</a>). This is typically 16 kB, but it may be
larger if the pieces are larger.</p>
</div>
<div class="section" id="peer-info">
<h1><a name="peer-info">peer_info</a></h1>

View File

@ -1084,6 +1084,8 @@ It contains the following fields::
int num_seeds;
float distributed_copies;
int block_size;
};
``progress`` is a value in the range [0, 1], that represents the progress of the
@ -1164,6 +1166,11 @@ pieces that have more copies than the rarest piece(s). For example: 2.5 would
mean that the rarest pieces have only 2 copies among the peers this torrent is
connected to, and that 50% of all the pieces have more than two copies.
``block_size`` is the size of a block, in bytes. A block is a sub piece, it
is the number of bytes that each piece request asks for and the number of
bytes that each bit in the ``partial_piece_info``'s bitset represents
(see `get_download_queue()`_). This is typically 16 kB, but it may be
larger if the pieces are larger.
peer_info
=========

View File

@ -87,6 +87,7 @@ namespace libtorrent
, total_done(0)
, num_seeds(0)
, distributed_copies(0.f)
, block_size(0)
{}
enum state_t
@ -152,6 +153,11 @@ namespace libtorrent
// the fractional part tells the fraction of pieces that
// have more copies than the rarest piece(s).
float distributed_copies;
// the block size that is used in this torrent. i.e.
// the number of bytes each piece request asks for
// and each bit in the download queue bitfield represents
int block_size;
};
struct partial_piece_info

View File

@ -873,6 +873,7 @@ namespace libtorrent
torrent_status st;
st.block_size = block_size();
st.num_peers = num_peers();
st.paused = m_paused;
st.total_done = bytes_done();