forked from premiere/premiere-libtorrent
merged changes from RC_1_0
This commit is contained in:
parent
cc1a4dcdd7
commit
790ef041bf
|
@ -71,6 +71,7 @@ DOCS_PAGES = \
|
||||||
docs/troubleshooting.html \
|
docs/troubleshooting.html \
|
||||||
docs/udp_tracker_protocol.html \
|
docs/udp_tracker_protocol.html \
|
||||||
docs/utp.html \
|
docs/utp.html \
|
||||||
|
docs/streaming.html \
|
||||||
docs/building.rst \
|
docs/building.rst \
|
||||||
docs/client_test.rst \
|
docs/client_test.rst \
|
||||||
docs/contributing.rst \
|
docs/contributing.rst \
|
||||||
|
@ -89,6 +90,7 @@ DOCS_PAGES = \
|
||||||
docs/troubleshooting.rst \
|
docs/troubleshooting.rst \
|
||||||
docs/udp_tracker_protocol.rst \
|
docs/udp_tracker_protocol.rst \
|
||||||
docs/utp.rst \
|
docs/utp.rst \
|
||||||
|
docs/streaming.rst \
|
||||||
docs/reference-Alerts.html \
|
docs/reference-Alerts.html \
|
||||||
docs/reference-Bencoding.html \
|
docs/reference-Bencoding.html \
|
||||||
docs/reference-Core.html \
|
docs/reference-Core.html \
|
||||||
|
|
|
@ -178,7 +178,7 @@ def main():
|
||||||
port=6881
|
port=6881
|
||||||
, max_download_rate=0
|
, max_download_rate=0
|
||||||
, max_upload_rate=0
|
, max_upload_rate=0
|
||||||
, save_path='./'
|
, save_path='.'
|
||||||
, allocation_mode='compact'
|
, allocation_mode='compact'
|
||||||
, proxy_host=''
|
, proxy_host=''
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,7 +12,7 @@ ses = lt.session()
|
||||||
ses.listen_on(6881, 6891)
|
ses.listen_on(6881, 6891)
|
||||||
|
|
||||||
info = lt.torrent_info(sys.argv[1])
|
info = lt.torrent_info(sys.argv[1])
|
||||||
h = ses.add_torrent({'ti': info, 'save_path': './'})
|
h = ses.add_torrent({'ti': info, 'save_path': '.'})
|
||||||
print('starting', h.name())
|
print('starting', h.name())
|
||||||
|
|
||||||
while (not h.is_seed()):
|
while (not h.is_seed()):
|
||||||
|
@ -20,9 +20,15 @@ while (not h.is_seed()):
|
||||||
|
|
||||||
state_str = ['queued', 'checking', 'downloading metadata', \
|
state_str = ['queued', 'checking', 'downloading metadata', \
|
||||||
'downloading', 'finished', 'seeding', 'allocating', 'checking fastresume']
|
'downloading', 'finished', 'seeding', 'allocating', 'checking fastresume']
|
||||||
print('\r%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s' % \
|
print('\r%.2f%% complete (down: %.1f kB/s up: %.1f kB/s peers: %d) %s' % \
|
||||||
(s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \
|
(s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \
|
||||||
s.num_peers, state_str[s.state]), end=' ')
|
s.num_peers, state_str[s.state]), end=' ')
|
||||||
|
|
||||||
|
alerts = ses.pop_alerts()
|
||||||
|
for a in alerts:
|
||||||
|
if a.category() & lt.alert.category_t.error_notification:
|
||||||
|
print(a)
|
||||||
|
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
|
||||||
<title>libtorrent manual</title>
|
<title>libtorrent manual</title>
|
||||||
<meta name="author" content="Arvid Norberg, arvid@libtorrent.org" />
|
<meta name="author" content="Arvid Norberg, arvid@libtorrent.org" />
|
||||||
<link rel="stylesheet" type="text/css" href="rst.css" />
|
<link rel="stylesheet" type="text/css" href="rst.css" />
|
||||||
|
@ -310,7 +310,12 @@ typically the case on x86 64 bit systems.</li>
|
||||||
<li><tt class="docutils literal">off</tt> - asserts are disabled</li>
|
<li><tt class="docutils literal">off</tt> - asserts are disabled</li>
|
||||||
<li><tt class="docutils literal">production</tt> - assertion failures are logged
|
<li><tt class="docutils literal">production</tt> - assertion failures are logged
|
||||||
to <tt class="docutils literal">asserts.log</tt> in the current working
|
to <tt class="docutils literal">asserts.log</tt> in the current working
|
||||||
directory, but won't abort the process.</li>
|
directory, but won't abort the process.
|
||||||
|
The file they are logged to can be customized
|
||||||
|
by setting the global pointer <tt class="docutils literal">extern char
|
||||||
|
const* libtorrent_assert_log</tt> to a different
|
||||||
|
filename.</li>
|
||||||
|
<li><tt class="docutils literal">system</tt> use the libc assert macro</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -445,19 +450,6 @@ awareness except on windows).</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><tt class="docutils literal">asserts</tt></td>
|
|
||||||
<td><ul class="first last simple">
|
|
||||||
<li><tt class="docutils literal">off</tt> - disable all asserts</li>
|
|
||||||
<li><tt class="docutils literal">production</tt> - enable asserts in release
|
|
||||||
builds, but don't abort, just log them to
|
|
||||||
<tt class="docutils literal">extern char const* libtorrent_assert_log</tt>.</li>
|
|
||||||
<li><tt class="docutils literal">on</tt> - enable asserts in debug builds (this is
|
|
||||||
the default). On GNU systems, print a stack
|
|
||||||
trace of the assert and some more information.</li>
|
|
||||||
<li><tt class="docutils literal">system</tt> use the libc assert macro</li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><tt class="docutils literal">i2p</tt></td>
|
<tr><td><tt class="docutils literal">i2p</tt></td>
|
||||||
<td><ul class="first last simple">
|
<td><ul class="first last simple">
|
||||||
<li><tt class="docutils literal">on</tt> - build with I2P support</li>
|
<li><tt class="docutils literal">on</tt> - build with I2P support</li>
|
||||||
|
|
|
@ -272,6 +272,11 @@ Build features:
|
||||||
| | * ``production`` - assertion failures are logged |
|
| | * ``production`` - assertion failures are logged |
|
||||||
| | to ``asserts.log`` in the current working |
|
| | to ``asserts.log`` in the current working |
|
||||||
| | directory, but won't abort the process. |
|
| | directory, but won't abort the process. |
|
||||||
|
| | The file they are logged to can be customized |
|
||||||
|
| | by setting the global pointer ``extern char |
|
||||||
|
| | const* libtorrent_assert_log`` to a different |
|
||||||
|
| | filename. |
|
||||||
|
| | * ``system`` use the libc assert macro |
|
||||||
+--------------------------+----------------------------------------------------+
|
+--------------------------+----------------------------------------------------+
|
||||||
| ``upnp-logging`` | * ``off`` - default. Does not log UPnP traffic. |
|
| ``upnp-logging`` | * ``off`` - default. Does not log UPnP traffic. |
|
||||||
| | * ``on`` - creates "upnp.log" with the messages |
|
| | * ``on`` - creates "upnp.log" with the messages |
|
||||||
|
@ -358,15 +363,6 @@ Build features:
|
||||||
| | * ``off`` - force not using iconv (disables locale |
|
| | * ``off`` - force not using iconv (disables locale |
|
||||||
| | awareness except on windows). |
|
| | awareness except on windows). |
|
||||||
+--------------------------+----------------------------------------------------+
|
+--------------------------+----------------------------------------------------+
|
||||||
| ``asserts`` | * ``off`` - disable all asserts |
|
|
||||||
| | * ``production`` - enable asserts in release |
|
|
||||||
| | builds, but don't abort, just log them to |
|
|
||||||
| | ``extern char const* libtorrent_assert_log``. |
|
|
||||||
| | * ``on`` - enable asserts in debug builds (this is |
|
|
||||||
| | the default). On GNU systems, print a stack |
|
|
||||||
| | trace of the assert and some more information. |
|
|
||||||
| | * ``system`` use the libc assert macro |
|
|
||||||
+--------------------------+----------------------------------------------------+
|
|
||||||
| ``i2p`` | * ``on`` - build with I2P support |
|
| ``i2p`` | * ``on`` - build with I2P support |
|
||||||
| | * ``off`` - build without I2P support |
|
| | * ``off`` - build without I2P support |
|
||||||
+--------------------------+----------------------------------------------------+
|
+--------------------------+----------------------------------------------------+
|
||||||
|
|
|
@ -327,10 +327,17 @@ to the <a class="reference external" href="reference-Session.html#session">sessi
|
||||||
</dl>
|
</dl>
|
||||||
<a name="save_path"></a><dl class="docutils">
|
<a name="save_path"></a><dl class="docutils">
|
||||||
<dt>save_path</dt>
|
<dt>save_path</dt>
|
||||||
<dd>the path where the torrent is or will be stored. Note that this may
|
<dd><p class="first">the path where the torrent is or will be stored. Note that this may
|
||||||
alos be stored in resume data. If you which the save path saved in
|
alos be stored in resume data. If you want the save path saved in
|
||||||
the resume data to be used, you need to set the
|
the resume data to be used, you need to set the
|
||||||
flag_use_resume_save_path flag.</dd>
|
flag_use_resume_save_path flag.</p>
|
||||||
|
<div class="note last">
|
||||||
|
<p class="first admonition-title">Note</p>
|
||||||
|
<p class="last">On windows this path (and other paths) are interpreted as UNC
|
||||||
|
paths. This means they must use backslashes as directory separators
|
||||||
|
and may not contain the special directories "." or "..".</p>
|
||||||
|
</div>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a name="resume_data"></a><dl class="docutils">
|
<a name="resume_data"></a><dl class="docutils">
|
||||||
<dt>resume_data</dt>
|
<dt>resume_data</dt>
|
||||||
|
@ -1563,26 +1570,26 @@ struct session_status
|
||||||
bool has_incoming_connections;
|
bool has_incoming_connections;
|
||||||
int upload_rate;
|
int upload_rate;
|
||||||
int download_rate;
|
int download_rate;
|
||||||
size_type total_download;
|
boost::int64_t total_download;
|
||||||
size_type total_upload;
|
boost::int64_t total_upload;
|
||||||
int payload_upload_rate;
|
int payload_upload_rate;
|
||||||
int payload_download_rate;
|
int payload_download_rate;
|
||||||
size_type total_payload_download;
|
boost::int64_t total_payload_download;
|
||||||
size_type total_payload_upload;
|
boost::int64_t total_payload_upload;
|
||||||
int ip_overhead_upload_rate;
|
int ip_overhead_upload_rate;
|
||||||
int ip_overhead_download_rate;
|
int ip_overhead_download_rate;
|
||||||
size_type total_ip_overhead_download;
|
boost::int64_t total_ip_overhead_download;
|
||||||
size_type total_ip_overhead_upload;
|
boost::int64_t total_ip_overhead_upload;
|
||||||
int dht_upload_rate;
|
int dht_upload_rate;
|
||||||
int dht_download_rate;
|
int dht_download_rate;
|
||||||
size_type total_dht_download;
|
boost::int64_t total_dht_download;
|
||||||
size_type total_dht_upload;
|
boost::int64_t total_dht_upload;
|
||||||
int tracker_upload_rate;
|
int tracker_upload_rate;
|
||||||
int tracker_download_rate;
|
int tracker_download_rate;
|
||||||
size_type total_tracker_download;
|
boost::int64_t total_tracker_download;
|
||||||
size_type total_tracker_upload;
|
boost::int64_t total_tracker_upload;
|
||||||
size_type total_redundant_bytes;
|
boost::int64_t total_redundant_bytes;
|
||||||
size_type total_failed_bytes;
|
boost::int64_t total_failed_bytes;
|
||||||
int num_peers;
|
int num_peers;
|
||||||
int num_dead_peers;
|
int num_dead_peers;
|
||||||
int num_unchoked;
|
int num_unchoked;
|
||||||
|
@ -1598,7 +1605,7 @@ struct session_status
|
||||||
int dht_nodes;
|
int dht_nodes;
|
||||||
int dht_node_cache;
|
int dht_node_cache;
|
||||||
int dht_torrents;
|
int dht_torrents;
|
||||||
size_type dht_global_nodes;
|
boost::int64_t dht_global_nodes;
|
||||||
std::vector<dht_lookup> active_requests;
|
std::vector<dht_lookup> active_requests;
|
||||||
std::vector<dht_routing_bucket> dht_routing_table;
|
std::vector<dht_routing_bucket> dht_routing_table;
|
||||||
int dht_total_allocations;
|
int dht_total_allocations;
|
||||||
|
|
599
docs/todo.html
599
docs/todo.html
File diff suppressed because one or more lines are too long
|
@ -287,9 +287,14 @@ namespace libtorrent
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
||||||
// the path where the torrent is or will be stored. Note that this may
|
// the path where the torrent is or will be stored. Note that this may
|
||||||
// alos be stored in resume data. If you which the save path saved in
|
// alos be stored in resume data. If you want the save path saved in
|
||||||
// the resume data to be used, you need to set the
|
// the resume data to be used, you need to set the
|
||||||
// flag_use_resume_save_path flag.
|
// flag_use_resume_save_path flag.
|
||||||
|
//
|
||||||
|
// .. note::
|
||||||
|
// On windows this path (and other paths) are interpreted as UNC
|
||||||
|
// paths. This means they must use backslashes as directory separators
|
||||||
|
// and may not contain the special directories "." or "..".
|
||||||
std::string save_path;
|
std::string save_path;
|
||||||
|
|
||||||
// The optional parameter, ``resume_data`` can be given if up to date
|
// The optional parameter, ``resume_data`` can be given if up to date
|
||||||
|
|
|
@ -2088,6 +2088,8 @@ namespace libtorrent
|
||||||
if (t && t->has_picker())
|
if (t && t->has_picker())
|
||||||
t->picker().check_peer_invariant(m_have_piece, this);
|
t->picker().check_peer_invariant(m_have_piece, this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// this will cause us to send the INTERESTED message
|
||||||
if (!t->is_upload_only())
|
if (!t->is_upload_only())
|
||||||
t->peer_is_interesting(*this);
|
t->peer_is_interesting(*this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue