113 lines
5.1 KiB
HTML
113 lines
5.1 KiB
HTML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
|
|
<title>client_test example program</title>
|
|
<meta name=viewport content="width=device-width, initial-scale=1">
|
|
<script type="text/javascript">
|
|
/* <![CDATA[ */
|
|
(function() {
|
|
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
|
|
s.type = 'text/javascript';
|
|
s.async = true;
|
|
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
|
|
t.parentNode.insertBefore(s, t);
|
|
})();
|
|
/* ]]> */
|
|
</script>
|
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
|
<link rel="stylesheet" type="text/css" href="rst.css" />
|
|
<style type="text/css">
|
|
/* Hides from IE-mac \*/
|
|
* html pre { height: 1%; }
|
|
/* End hide from IE-mac */
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="document" id="client-test-example-program">
|
|
<div id="container">
|
|
<table id="header">
|
|
<tr><td id="orange"></td>
|
|
<td id="logo">libtorrent</td></tr>
|
|
</table>
|
|
<div id="main">
|
|
<h1 class="title">client_test example program</h1>
|
|
|
|
<p>Client test is a, more or less, complete bittorrent client. It lacks most
|
|
settings and you can't start or stop torrents once you've started it. All
|
|
the settings are hardcoded. The commandline arguments are:</p>
|
|
<pre class="literal-block">
|
|
client_test <filename1.torrent> <filename2.torrent> ...
|
|
</pre>
|
|
<p>You can start any number of torrent downloads/seeds via the commandline.
|
|
If one argument starts with <tt class="docutils literal"><span class="pre">http://</span></tt> it is interpreted as a tracker
|
|
announce url, and it expects an info-hash as the next argument. The info-hash
|
|
has to be hex-encoded. For example: <tt class="docutils literal">2410d4554d5ed856d69f426c38791673c59f4418</tt>.
|
|
If you pass an announce url and info-hash, a torrent-less download is started.
|
|
It relies on that at least one peer on the tracker is running a libtorrent based
|
|
client and has the metadata (.torrent file). The metadata extension in
|
|
libtorrent will then download it from that peer (or from those peers if more
|
|
than one).</p>
|
|
<p>While running, the <tt class="docutils literal">client_test</tt> sample will look something like this:</p>
|
|
<img alt="client_test.png" src="client_test.png" />
|
|
<p>The commands available in the client are:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">q</tt> quits the client (there will be a delay while the client waits
|
|
for tracker responses)</li>
|
|
<li><tt class="docutils literal">l</tt> toggle log. Will display the log at the bottom, informing about
|
|
tracker and peer events.</li>
|
|
<li><tt class="docutils literal">i</tt> toggles torrent info. Will show the peer list for each torrent.</li>
|
|
<li><tt class="docutils literal">d</tt> toggle download info. Will show the block list for each torrent,
|
|
showing downloaded and requested blocks.</li>
|
|
<li><tt class="docutils literal">p</tt> pause all torrents.</li>
|
|
<li><tt class="docutils literal">u</tt> unpause all torrents.</li>
|
|
<li><tt class="docutils literal">r</tt> force tracker reannounce for all torrents.</li>
|
|
<li><tt class="docutils literal">f</tt> toggle show file progress. Displays a list of all files and the
|
|
download progress for each file.</li>
|
|
</ul>
|
|
<p>The list at the bottom (shown if you press <tt class="docutils literal">d</tt>) shows which blocks has
|
|
been requested from which peer. The green background means that it has been
|
|
downloaded. It shows that fast peers will prefer to request whole pieces
|
|
instead of dowloading parts of pieces. It may make it easier to determine
|
|
which peer that sent the corrupt data if a piece fails the hash test.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<div id="gradient"></div>
|
|
<div id="footer">
|
|
<table>
|
|
<tr>
|
|
<td><a href="index.html">home</a></td>
|
|
<td><a href="http://blog.libtorrent.org">blog</a></td>
|
|
<td><a href="utp.html">uTP</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://sourceforge.net/projects/libtorrent/files/libtorrent/">download</a></td>
|
|
<td><a href="reference.html">documentation</a></td>
|
|
<td><a href="dht_store.html">DHT put extension</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://sourceforge.net/projects/libtorrent/files/py-libtorrent/">python bindings</a></td>
|
|
<td><a href="features.html">features</a></td>
|
|
<td><a href="dht_sec.html">DHT security extension</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="http://dir.gmane.org/gmane.network.bit-torrent.libtorrent">mailing list archive</a></td>
|
|
<td><a href="contributing.html">contributing</a></td>
|
|
<td><a href="streaming.html">streaming</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="http://code.google.com/p/libtorrent/issues/entry">report a bug</a></td>
|
|
<td><a href="building.html">building</a></td>
|
|
<td><a href="bittorrent.pdf">bittorrent slides</a></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="filler"></div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|