2006-08-28 02:36:00 +02:00
|
|
|
===================
|
|
|
|
libtorrent Examples
|
|
|
|
===================
|
|
|
|
|
2014-10-14 04:06:20 +02:00
|
|
|
:Author: Arvid Norberg, arvid@libtorrent.org
|
2017-12-29 10:51:58 +01:00
|
|
|
:Version: 1.1.6
|
2006-08-28 02:36:00 +02:00
|
|
|
|
|
|
|
.. contents:: Table of contents
|
|
|
|
:depth: 2
|
|
|
|
:backlinks: none
|
|
|
|
|
|
|
|
examples
|
|
|
|
========
|
|
|
|
|
|
|
|
Except for the example programs in this manual, there's also a bigger example
|
|
|
|
of a (little bit) more complete client, ``client_test``. There are separate
|
2006-09-23 23:24:28 +02:00
|
|
|
instructions for how to use it here__ if you'd like to try it. Note that building
|
|
|
|
``client_test`` also requires boost.regex and boost.program_options library.
|
2006-08-28 02:36:00 +02:00
|
|
|
|
|
|
|
__ client_test.html
|
|
|
|
|
|
|
|
simple client
|
|
|
|
-------------
|
|
|
|
|
2014-09-03 08:52:45 +02:00
|
|
|
This is a simple client. It doesn't have much output to keep it simple:
|
2006-08-28 02:36:00 +02:00
|
|
|
|
2014-09-03 08:52:45 +02:00
|
|
|
.. include:: ../examples/simple_client.cpp
|
|
|
|
:code: c++
|
|
|
|
:tab-width: 2
|
|
|
|
:start-after: */
|
2014-07-06 21:18:00 +02:00
|
|
|
|
2014-09-03 08:52:45 +02:00
|
|
|
make_torrent
|
|
|
|
------------
|
2014-07-06 21:18:00 +02:00
|
|
|
|
2014-09-03 08:52:45 +02:00
|
|
|
Shows how to create a torrent from a directory tree:
|
2006-08-28 02:36:00 +02:00
|
|
|
|
2014-09-03 08:52:45 +02:00
|
|
|
.. include:: ../examples/make_torrent.cpp
|
|
|
|
:code: c++
|
|
|
|
:tab-width: 2
|
|
|
|
:start-after: */
|
|
|
|
|
|
|
|
dump_torrent
|
2006-08-28 02:36:00 +02:00
|
|
|
------------
|
|
|
|
|
2014-09-03 08:52:45 +02:00
|
|
|
This is an example of a program that will take a torrent-file as a parameter and
|
|
|
|
print information about it to std out:
|
|
|
|
|
|
|
|
.. include:: ../examples/dump_torrent.cpp
|
|
|
|
:code: c++
|
|
|
|
:tab-width: 2
|
|
|
|
:start-after: */
|
2006-08-28 02:36:00 +02:00
|
|
|
|