2003-11-23 04:00:45 +01:00
<?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" >
2003-10-23 01:00:57 +02:00
< head >
2003-11-23 04:00:45 +01:00
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< meta name = "generator" content = "Docutils 0.3.1: http://docutils.sourceforge.net/" / >
< title > libtorrent< / title >
< link rel = "stylesheet" href = "style.css" type = "text/css" / >
2003-10-23 01:00:57 +02:00
< / head >
< body >
2003-11-23 04:00:45 +01:00
< div class = "document" id = "libtorrent" >
< h1 class = "title" > libtorrent< / h1 >
< table border class = "table" >
< colgroup >
< col width = "56%" / >
< col width = "44%" / >
< / colgroup >
< tbody valign = "top" >
< tr > < td > < a class = "reference" href = "http://www.sourceforge.net/projects/libtorrent" > sourceforge page< / a > < / td >
< td > < a class = "reference" href = "http://lists.sourceforge.net/lists/listinfo/libtorrent-discus" > mailing list< / a > < / td >
2003-10-23 18:55:52 +02:00
< / tr >
2003-11-23 04:00:45 +01:00
< / tbody >
2003-10-23 18:55:52 +02:00
< / table >
2003-11-23 04:00:45 +01:00
< div class = "contents topic" id = "contents" >
< p class = "topic-title" > < a name = "contents" > Contents< / a > < / p >
< ul class = "simple" >
2003-11-26 17:02:17 +01:00
< li > < a class = "reference" href = "#introduction" id = "id6" name = "id6" > introduction< / a > < / li >
< li > < a class = "reference" href = "#building" id = "id7" name = "id7" > building< / a > < / li >
< li > < a class = "reference" href = "#using" id = "id8" name = "id8" > using< / a > < ul >
< li > < a class = "reference" href = "#session" id = "id9" name = "id9" > session< / a > < / li >
< li > < a class = "reference" href = "#parsing-torrent-files" id = "id10" name = "id10" > parsing torrent files< / a > < / li >
< li > < a class = "reference" href = "#entry" id = "id11" name = "id11" > entry< / a > < / li >
< li > < a class = "reference" href = "#torrent-info" id = "id12" name = "id12" > torrent_info< / a > < / li >
< li > < a class = "reference" href = "#torrent-handle" id = "id13" name = "id13" > torrent_handle< / a > < ul >
< li > < a class = "reference" href = "#status" id = "id14" name = "id14" > status()< / a > < / li >
< li > < a class = "reference" href = "#get-download-queue" id = "id15" name = "id15" > get_download_queue()< / a > < / li >
< li > < a class = "reference" href = "#get-peer-info" id = "id16" name = "id16" > get_peer_info()< / a > < / li >
2003-11-23 04:00:45 +01:00
< / ul >
< / li >
2003-11-26 17:02:17 +01:00
< li > < a class = "reference" href = "#address" id = "id17" name = "id17" > address< / a > < / li >
< li > < a class = "reference" href = "#http-settings" id = "id18" name = "id18" > http_settings< / a > < / li >
< li > < a class = "reference" href = "#big-number" id = "id19" name = "id19" > big_number< / a > < / li >
< li > < a class = "reference" href = "#hasher" id = "id20" name = "id20" > hasher< / a > < / li >
< li > < a class = "reference" href = "#example-usage" id = "id21" name = "id21" > example usage< / a > < ul >
< li > < a class = "reference" href = "#dump-torrent" id = "id22" name = "id22" > dump_torrent< / a > < / li >
< li > < a class = "reference" href = "#simple-client" id = "id23" name = "id23" > simple client< / a > < / li >
2003-11-23 04:00:45 +01:00
< / ul >
< / li >
< / ul >
< / li >
2003-11-26 17:02:17 +01:00
< li > < a class = "reference" href = "#feedback" id = "id24" name = "id24" > Feedback< / a > < / li >
< li > < a class = "reference" href = "#aknowledgements" id = "id25" name = "id25" > Aknowledgements< / a > < / li >
2003-11-23 04:00:45 +01:00
< / ul >
< / div >
< div class = "section" id = "introduction" >
2003-11-26 17:02:17 +01:00
< h1 > < a class = "toc-backref" href = "#id6" name = "introduction" > introduction< / a > < / h1 >
2003-11-23 04:00:45 +01:00
< p > libtorrent is a C++ library that aims to be a good alternative to all the
< a class = "reference" href = "links.html" > other bittorrent implementations< / a > around. It is a
2003-10-23 01:00:57 +02:00
library and not a full featured client, although it comes with a working
2003-11-23 04:00:45 +01:00
example client.< / p >
< p > The main goals of libtorrent are:< / p >
< blockquote >
< ul class = "simple" >
< li > to be cpu efficient< / li >
< li > to be memory efficient< / li >
< li > to be very easy to use< / li >
2003-10-23 01:00:57 +02:00
< / ul >
2003-11-23 04:00:45 +01:00
< / blockquote >
< p > libtorrent is not finished. It is an ongoing project (including this documentation).
The current state includes the following features:< / p >
< blockquote >
< ul class = "simple" >
< li > multitracker extension support (as < a class = "reference" href = "http://home.elp.rr.com/tur/multitracker-spec.txt" > described by TheShadow< / a > )< / li >
< li > serves multiple torrents on a single port and a single thread< / li >
< li > supports http proxies and proxy authentication< / li >
< li > gzipped tracker-responses< / li >
< li > piece picking on block-level (as opposed to piece-level) like in < a class = "reference" href = "http://azureus.sourceforge.net" > Azureus< / a > < / li >
< li > queues torrents for file check, instead of checking all of them in parallel.< / li >
< li > uses separate threads for checking files and for main downloader, with a fool-proof
thread-safe library interface. (i.e. There's no way for the user to cause a deadlock).< / li >
< li > can limit the upload bandwidth usage< / li >
2003-11-26 17:02:17 +01:00
< li > piece-wise file allocation< / li >
2003-11-02 22:06:50 +01:00
< / ul >
2003-11-23 04:00:45 +01:00
< / blockquote >
< p > Functions that are yet to be implemented:< / p >
< blockquote >
< ul class = "simple" >
< li > optimistic unchoke< / li >
2003-11-26 17:02:17 +01:00
< li > choke/unchoke algorithm< / li >
2003-11-23 04:00:45 +01:00
< li > Snubbing< / li >
< li > fast resume< / li >
< li > file-level piece priority< / li >
2003-11-26 17:02:17 +01:00
< li > a good upload speed cap (the one currently used don't balance loads between peers)< / li >
2003-10-23 01:00:57 +02:00
< / ul >
2003-11-23 04:00:45 +01:00
< / blockquote >
< p > libtorrent is portable at least among windows, macosx, and UNIX-systems. It uses boost.thread,
boost.filesystem boost.date_time and various other boost libraries and zlib.< / p >
< p > libtorrent has been successfully compiled and tested on:< / p >
< blockquote >
< ul class = "simple" >
< li > Cygwin GCC 3.3.1< / li >
< li > Windows 2000 vc7.1< / li >
< li > Linux x86 (debian) GCC 3.0< / li >
2003-10-24 14:44:18 +02:00
< / ul >
2003-11-23 04:00:45 +01:00
< / blockquote >
< / div >
< div class = "section" id = "building" >
2003-11-26 17:02:17 +01:00
< h1 > < a class = "toc-backref" href = "#id7" name = "building" > building< / a > < / h1 >
2003-11-23 04:00:45 +01:00
< p > To build libtorrent you need < a class = "reference" href = "http://www.boost.org" > boost< / a > and bjam installed.
Then you can use < tt class = "literal" > < span class = "pre" > bjam< / span > < / tt > to build libtorrent.< / p >
< p > To make bjam work, you need to set the environment variable < tt class = "literal" > < span class = "pre" > BOOST_ROOT< / span > < / tt > to the
path where boost is installed (e.g. c:boost_1_30_2 on windows). Then you can just run
< tt class = "literal" > < span class = "pre" > bjam< / span > < / tt > in the libtorrent directory.< / p >
< p > The Jamfile doesn't work yet. On unix-systems you can use the makefile however. You
2003-10-24 13:42:07 +02:00
first have to build boost.thread and boost.filesystem. You do this by, in the directory
2003-11-23 04:00:45 +01:00
'boost-1.30.2/tools/build/jam_src' run the build script < tt class = "literal" > < span class = "pre" > ./build.sh< / span > < / tt > . This should
2003-10-24 13:42:07 +02:00
produce at least one folder with the 'bin' prefix (and the rest of the name describes
2003-11-23 04:00:45 +01:00
your platform). Put the files in that folder somewhere in your path.< / p >
< p > You can then invoke < tt class = "literal" > < span class = "pre" > bjam< / span > < / tt > in the directories 'boost-1.30.2/libs/thread/build' and
2003-10-24 13:42:07 +02:00
'boost-1.30.2/libs/filesystem/build'. That will produce the needed libraries. Put these
libraries in the libtorrent root directory. You then have to modify the makefile to use
2003-11-23 04:00:45 +01:00
you prefered compiler and to have the correct path to your boost istallation.< / p >
< p > Then the makefile should be able to do the rest.< / p >
< p > When building (with boost 1.30.2) on linux and solaris however, I found that I had to make the following
2003-10-24 13:42:07 +02:00
modifications to the boost.date-time library. In the file:
2003-10-30 00:28:09 +01:00
'boost-1.30.2/boost/date_time/gregorian_calendar.hpp' line 59. Prepend 'boost/date_time/'
2003-11-23 04:00:45 +01:00
to the include path.< / p >
2003-10-24 13:42:07 +02:00
< p > And the second modification was in the file:
'boost-1.30.2/boost/date_time/microsec_time_clock.hpp' add the following include at the top
2003-11-23 04:00:45 +01:00
of the file:< / p >
< pre class = "literal-block" >
#include " boost/cstdint.hpp"
< / pre >
< p > In developer studio, you may have to set the compiler options " force conformance in for
loop scope" and " treat wchar_t as built-in type" to Yes.< / p >
< p > TODO: more detailed build instructions.< / p >
< / div >
< div class = "section" id = "using" >
2003-11-26 17:02:17 +01:00
< h1 > < a class = "toc-backref" href = "#id8" name = "using" > using< / a > < / h1 >
2003-11-23 04:00:45 +01:00
< p > The interface of libtorrent consists of a few classes. The main class is
the < tt class = "literal" > < span class = "pre" > session< / span > < / tt > , it contains the main loop that serves all torrents.< / p >
< div class = "section" id = "session" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id9" name = "session" > session< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > The < tt class = "literal" > < span class = "pre" > session< / span > < / tt > class has the following synopsis:< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
class session: public boost::noncopyable
{
2003-11-23 04:00:45 +01:00
session(int listen_port, const std::string& fingerprint = std::string());
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
torrent_handle add_torrent(const torrent_info& t, const std::string& save_path);
void remove_torrent(const torrent_handle& h);
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
void set_http_settings(const http_settings& settings);
void set_upload_rate_limit(int bytes_per_second);
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > Once it's created, it will spawn the main thread that will do all the work.
2003-10-23 01:00:57 +02:00
The main thread will be idle as long it doesn't have any torrents to participate in.
2003-11-23 04:00:45 +01:00
You add torrents through the < tt class = "literal" > < span class = "pre" > add_torrent()< / span > < / tt > -function where you give an
2003-10-23 01:00:57 +02:00
object representing the information found in the torrent file and the path where you
2003-11-23 04:00:45 +01:00
want to save the files. The < tt class = "literal" > < span class = "pre" > save_path< / span > < / tt > will be prepended to the directory-
structure in the torrent-file.< / p >
< p > < tt class = "literal" > < span class = "pre" > remove_torrent()< / span > < / tt > will close all peer connections associated with the torrent and tell
the tracker that we've stopped participating in the swarm.< / p >
< p > If the torrent you are trying to add already exists in the session (is either queued
for checking, being checked or downloading) < tt class = "literal" > < span class = "pre" > add_torrent()< / span > < / tt > will throw
< tt class = "literal" > < span class = "pre" > duplicate_torrent< / span > < / tt > which derives from < tt class = "literal" > < span class = "pre" > std::exception< / span > < / tt > .< / p >
< p > < tt class = "literal" > < span class = "pre" > fingerprint< / span > < / tt > is a short string that will be used in the peer_id to
2003-10-31 16:06:32 +01:00
identify the client. If the string is longer than 7 characters it will
2003-11-23 04:00:45 +01:00
be trimmed down to 7 characters. The default is an empty string.< / p >
< p > < tt class = "literal" > < span class = "pre" > set_upload_rate_limit()< / span > < / tt > set the maximum number of bytes allowed to be
2003-11-09 19:17:09 +01:00
sent to peers per second. This bandwidth is distributed among all the peers. If
2003-11-23 04:00:45 +01:00
you don't want to limit upload rate, you can set this to -1 (the default).< / p >
< p > The destructor of session will notify all trackers that our torrents has been shut down.
2003-11-09 19:17:09 +01:00
If some trackers are down, they will timout. All this before the destructor of session
returns. So, it's adviced that any kind of interface (such as windows) are closed before
destructing the sessoin object. Because it can take a few second for it to finish. The
2003-11-23 04:00:45 +01:00
timeout can be set with < tt class = "literal" > < span class = "pre" > set_http_settings()< / span > < / tt > .< / p >
< p > How to parse a torrent file and create a < tt class = "literal" > < span class = "pre" > torrent_info< / span > < / tt > object is described below.< / p >
< p > The < a class = "reference" href = "#torrent-handle" > torrent_handle< / a > returned by < tt class = "literal" > < span class = "pre" > add_torrent< / span > < / tt > can be used to retrieve information
about the torrent's progress, its peers etc. It is also used to abort a torrent.< / p >
< p > The constructor takes a listen port as argument, if the given port is busy it will
2003-10-23 01:00:57 +02:00
increase the port number by one and try again. If it still fails it will continue
2003-11-23 04:00:45 +01:00
increasing the port number until it succeeds or has failed 9 ports. < em > This will
change in the future to give more control of the listen-port.< / em > < / p >
< / div >
< div class = "section" id = "parsing-torrent-files" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id10" name = "parsing-torrent-files" > parsing torrent files< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > The torrent files are < a class = "reference" href = "http://bitconjurer.org/BitTorrent/protocol.html" > bencoded< / a > . There are two functions in libtorrent that can encode and decode
bencoded data. They are:< / p >
< pre class = "literal-block" >
template< class InIt> entry bdecode(InIt start, InIt end);
template< class OutIt> void bencode(OutIt out, const entry& e);
< / pre >
< p > The < tt class = "literal" > < span class = "pre" > entry< / span > < / tt > class is the internal representation of the bencoded data
2003-10-23 01:00:57 +02:00
and it can be used to retreive information, an entry can also be build by
2003-11-23 04:00:45 +01:00
the program and given to < tt class = "literal" > < span class = "pre" > bencode()< / span > < / tt > to encode it into the < tt class = "literal" > < span class = "pre" > OutIt< / span > < / tt >
iterator.< / p >
< p > The < tt class = "literal" > < span class = "pre" > OutIt< / span > < / tt > and < tt class = "literal" > < span class = "pre" > InIt< / span > < / tt > are iterators
(< tt class = "literal" > < span class = "pre" > InputIterator_< / span > < / tt > and < tt class = "literal" > < span class = "pre" > OutputIterator_< / span > < / tt > respectively). They
are templates and are usually instantiated as < tt class = "literal" > < span class = "pre" > ostream_iterator_< / span > < / tt > ,
< tt class = "literal" > < span class = "pre" > back_insert_iterator_< / span > < / tt > or < tt class = "literal" > < span class = "pre" > istream_iterator_< / span > < / tt > . These
functions will assume that the iterator refers to a character
(< tt class = "literal" > < span class = "pre" > char< / span > < / tt > ). So, if you want to encode entry < tt class = "literal" > < span class = "pre" > e< / span > < / tt > into a buffer
in memory, you can do it like this:< / p >
< pre class = "literal-block" >
std::vector< char> buffer;
2003-10-23 01:00:57 +02:00
bencode(std::back_insert_iterator< std::vector< char> > (buf), e);
2003-11-23 04:00:45 +01:00
< / pre >
< p > If you want to decode a torrent file from a buffer in memory, you can do it like this:< / p >
< pre class = "literal-block" >
std::vector< char> buffer;
2003-10-23 01:00:57 +02:00
// ...
entry e = bdecode(buf.begin(), buf.end());
2003-11-23 04:00:45 +01:00
< / pre >
< p > Or, if you have a raw char buffer:< / p >
< pre class = "literal-block" >
const char* buf;
2003-10-23 01:00:57 +02:00
// ...
entry e = bdecode(buf, buf + data_size);
2003-11-23 04:00:45 +01:00
< / pre >
< p > Now we just need to know how to retrieve information from the < tt class = "literal" > < span class = "pre" > entry< / span > < / tt > .< / p >
< / div >
< div class = "section" id = "entry" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id11" name = "entry" > entry< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > The < tt class = "literal" > < span class = "pre" > entry< / span > < / tt > class represents one node in a bencoded hierarchy. It works as a
variant type, it can be either a list, a dictionary (< tt class = "literal" > < span class = "pre" > std::map< / span > < / tt > ), an integer
or a string. This is its synopsis:< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
class entry
{
public:
2003-11-23 04:00:45 +01:00
typedef std::map< std::string, entry> dictionary_type;
typedef std::string string_type;
typedef std::vector< entry> list_type;
typedef implementation-defined integer_type;
enum data_type
{
int_t,
string_t,
list_t,
dictionary_t,
undefined_t
};
data_type type() const;
entry();
entry(data_type t);
entry(const entry& e);
void operator=(const entry& e);
integer_type& integer()
const integer_type& integer() const;
string_type& string();
const string_type& string() const;
list_type& list();
const list_type& list() const;
dictionary_type& dict();
const dictionary_type& dict() const;
void print(std::ostream& os, int indent = 0) const;
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > The < tt class = "literal" > < span class = "pre" > integer()< / span > < / tt > , < tt class = "literal" > < span class = "pre" > string()< / span > < / tt > , < tt class = "literal" > < span class = "pre" > list()< / span > < / tt > and < tt class = "literal" > < span class = "pre" > dict()< / span > < / tt > functions
are accessorts that return the respecive type. If the < tt class = "literal" > < span class = "pre" > entry< / span > < / tt > object isn't of the
type you request, the accessor will throw < tt class = "literal" > < span class = "pre" > type_error< / span > < / tt > (which derives from
< tt class = "literal" > < span class = "pre" > std::runtime_error< / span > < / tt > ). You can ask an < tt class = "literal" > < span class = "pre" > entry< / span > < / tt > for its type through the
< tt class = "literal" > < span class = "pre" > type()< / span > < / tt > function.< / p >
< p > The < tt class = "literal" > < span class = "pre" > print()< / span > < / tt > function is there for debug purposes only.< / p >
< p > If you want to create an < tt class = "literal" > < span class = "pre" > entry< / span > < / tt > you give it the type you want it to have in its
2003-10-23 01:00:57 +02:00
constructor, and then use one of the non-const accessors to get a reference which you then
2003-11-23 04:00:45 +01:00
can assign the value you want it to have.< / p >
< p > The typical code to get info from a torrent file will then look like this:< / p >
< pre class = "literal-block" >
entry torrent_file;
2003-10-23 01:00:57 +02:00
// ...
const entry::dictionary_type& dict = torrent_file.dict();
entry::dictionary_type::const_iterator i;
2003-11-23 04:00:45 +01:00
i = dict.find(" announce" );
2003-10-23 01:00:57 +02:00
if (i != dict.end())
{
2003-11-23 04:00:45 +01:00
std::string tracker_url= i-> second.string();
std::cout < < tracker_url < < " \n" ;
2003-10-23 01:00:57 +02:00
}
2003-11-23 04:00:45 +01:00
< / pre >
< p > To make it easier to extract information from a torren file, the class < tt class = "literal" > < span class = "pre" > torrent_info< / span > < / tt >
exists.< / p >
< / div >
< div class = "section" id = "torrent-info" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id12" name = "torrent-info" > torrent_info< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > The < tt class = "literal" > < span class = "pre" > torrent_info< / span > < / tt > has the following synopsis:< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
class torrent_info
{
public:
2003-11-23 04:00:45 +01:00
torrent_info(const entry& torrent_file)
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
typedef std::vector> file> ::const_iterator file_iterator;
typedef std::vector< file> ::const_reverse_iterator reverse_file_iterator;
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
file_iterator begin_files() const;
file_iterator end_files() const;
reverse_file_iterator rbegin_files() const;
reverse_file_iterator rend_files() const;
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
std::size_t num_files() const;
const file& file_at(int index) const;
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
const std::vector< announce_entry> & trackers() const;
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
int prioritize_tracker(int index);
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
entry::integer_type total_size() const;
entry::integer_type piece_length() const;
std::size_t num_pieces() const;
const sha1_hash& info_hash() const;
const std::stirng& name() const;
const std::string& comment() const;
boost::posiz_time::ptime creation_date() const;
2003-11-20 20:58:29 +01:00
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
void print(std::ostream& os) const;
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
entry::integer_type piece_size(unsigned int index) const;
const sha1_hash& hash_for_piece(unsigned int index) const;
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > This class will need some explanation. First of all, to get a list of all files
in the torrent, you can use < tt class = "literal" > < span class = "pre" > begin_files()< / span > < / tt > , < tt class = "literal" > < span class = "pre" > end_files()< / span > < / tt > ,
< tt class = "literal" > < span class = "pre" > rbegin_files()< / span > < / tt > and < tt class = "literal" > < span class = "pre" > rend_files()< / span > < / tt > . These will give you standard vector
iterators with the type < tt class = "literal" > < span class = "pre" > file< / span > < / tt > .< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
struct file
{
2003-11-23 04:00:45 +01:00
std::string path;
std::string filename;
entry::integer_type size;
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > If you need index-access to files you can use the < tt class = "literal" > < span class = "pre" > num_files()< / span > < / tt > and < tt class = "literal" > < span class = "pre" > file_at()< / span > < / tt >
to access files using indices.< / p >
< p > The < tt class = "literal" > < span class = "pre" > print()< / span > < / tt > function is there for debug purposes only. It will print the info from
the torrent file to the given outstream.< / p >
< p > < tt class = "literal" > < span class = "pre" > name()< / span > < / tt > returns the name of the torrent.< / p >
< p > The < tt class = "literal" > < span class = "pre" > trackers()< / span > < / tt > function will return a sorted vector of < tt class = "literal" > < span class = "pre" > announce_entry< / span > < / tt > .
2003-10-23 01:00:57 +02:00
Each announce entry contains a string, which is the tracker url, and a tier index. The
tier index is the high-level priority. No matter which trackers that works or not, the
2003-11-23 04:00:45 +01:00
ones with lower tier will always be tried before the one with higher tier number.< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
struct announce_entry
{
2003-11-23 04:00:45 +01:00
std::string url;
int tier;
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > The < tt class = "literal" > < span class = "pre" > prioritize_tracker()< / span > < / tt > is used internally to move a tracker to the front
2003-10-23 01:00:57 +02:00
of its tier group. i.e. It will never be moved pass a tracker with a different tier
number. For more information about how multiple trackers are dealt with, see the
2003-11-23 04:00:45 +01:00
< a class = "reference" href = "http://home.elp.rr.com/tur/multitracker-spec.txt" > specification< / a > .< / p >
< p > < tt class = "literal" > < span class = "pre" > total_size()< / span > < / tt > , < tt class = "literal" > < span class = "pre" > piece_length()< / span > < / tt > and < tt class = "literal" > < span class = "pre" > num_pieces()< / span > < / tt > returns the total
2003-10-23 01:00:57 +02:00
number of bytes the torrent-file represents (all the files in it), the number of byte for
each piece and the total number of pieces, respectively. The difference between
2003-11-23 04:00:45 +01:00
< tt class = "literal" > < span class = "pre" > piece_size()< / span > < / tt > and < tt class = "literal" > < span class = "pre" > piece_length()< / span > < / tt > is that < tt class = "literal" > < span class = "pre" > piece_size()< / span > < / tt > takes
2003-10-23 01:00:57 +02:00
the piece index as argument and gives you the exact size of that piece. It will always
2003-11-23 04:00:45 +01:00
be the same as < tt class = "literal" > < span class = "pre" > piece_length()< / span > < / tt > except in the case of the last piece, which may
be smaller.< / p >
< p > < tt class = "literal" > < span class = "pre" > hash_for_piece()< / span > < / tt > takes a piece-index and returns the 20-bytes sha1-hash for that
piece and < tt class = "literal" > < span class = "pre" > info_hash()< / span > < / tt > returns the 20-bytes sha1-hash for the info-section of the
torrent file. For more information on the < tt class = "literal" > < span class = "pre" > sha1_hash< / span > < / tt > , see the < a class = "reference" href = "#big-number" > big_number< / a > class.< / p >
< p > < tt class = "literal" > < span class = "pre" > comment()< / span > < / tt > returns the comment associated with the torrent. If there's no comment,
it will return an empty string. < tt class = "literal" > < span class = "pre" > creation_date()< / span > < / tt > returns a < tt class = "literal" > < span class = "pre" > boost::posix_time::ptime_< / span > < / tt >
2003-11-20 20:58:29 +01:00
object, representing the time when this torrent file was created. If there's no timestamp
2003-11-23 04:00:45 +01:00
in the torrent file, this will return a date of january 1:st 1970.< / p >
< / div >
< div class = "section" id = "torrent-handle" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id13" name = "torrent-handle" > torrent_handle< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > You will usually have to store your torrent handles somewhere, since it's the
2003-10-31 16:06:32 +01:00
object through which you retrieve infromation about the torrent and aborts the torrent.
2003-11-23 04:00:45 +01:00
Its declaration looks like this:< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
struct torrent_handle
{
2003-11-23 04:00:45 +01:00
torrent_handle();
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
torrent_status status() const;
void get_download_queue(std::vector< partial_piece_info> & queue);
void get_peer_info(std::vector< peer_info> & v);
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > The default constructor will initialize the handle to an invalid state. Which means you cannot
2003-11-02 22:06:50 +01:00
perform any operation on it, unless you first assign it a valid handle. If you try to perform
2003-11-23 04:00:45 +01:00
any operation they will simply return.< / p >
< div class = "section" id = "status" >
2003-11-26 17:02:17 +01:00
< h3 > < a class = "toc-backref" href = "#id14" name = "status" > status()< / a > < / h3 >
2003-11-23 04:00:45 +01:00
< p > < tt class = "literal" > < span class = "pre" > status()< / span > < / tt > will return a structure with information about the status of this
torrent. It contains the following fields:< / p >
< pre class = "literal-block" >
2003-10-31 05:02:51 +01:00
struct torrent_status
{
2003-11-23 04:00:45 +01:00
enum state_t
{
invalid_handle,
queued_for_checking,
checking_files,
downloading,
seeding
};
state_t state;
float progress;
boost::posix_time::time_duration next_announce;
std::size_t total_download;
std::size_t total_upload;
std::vector< bool> pieces;
std::size_t total_done;
2003-10-31 05:02:51 +01:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > < tt class = "literal" > < span class = "pre" > progress< / span > < / tt > is a value in the range [0, 1], that represents the progress of the
2003-10-31 05:02:51 +01:00
torrent's current task. It may be checking files or downloading. The torrent's
2003-11-23 04:00:45 +01:00
current task is in the < tt class = "literal" > < span class = "pre" > state< / span > < / tt > member, it will be one of the following:< / p >
< table border class = "table" >
< colgroup >
< col width = "28%" / >
< col width = "72%" / >
< / colgroup >
< tbody valign = "top" >
< tr > < td > < tt class = "literal" > < span class = "pre" > invalid_handle< / span > < / tt > < / td >
< td > This will be the state if you called status on an
uninitialized handle (a handle that was constructed
with the default constructor).< / td >
< / tr >
< tr > < td > < tt class = "literal" > < span class = "pre" > queued_for_checking< / span > < / tt > < / td >
< td > The torrent is in the queue for being checked. But there
currently is another torrent that are being checked.
This torrent will wait for its turn.< / td >
< / tr >
< tr > < td > < tt class = "literal" > < span class = "pre" > checking_files< / span > < / tt > < / td >
< td > The torrent has not started its download yet, and is
currently checking existing files.< / td >
< / tr >
< tr > < td > < tt class = "literal" > < span class = "pre" > downloading< / span > < / tt > < / td >
< td > The torrent is being downloaded. This is the state
most torrents will be in most of the time. The progress
meter will tell how much of the files that has been
downloaded.< / td >
< / tr >
< tr > < td > < tt class = "literal" > < span class = "pre" > seeding< / span > < / tt > < / td >
< td > In this state the torrent has finished downloading and
is a pure seeder.< / td >
< / tr >
< / tbody >
2003-10-23 01:00:57 +02:00
< / table >
2003-11-23 04:00:45 +01:00
< p > < tt class = "literal" > < span class = "pre" > next_announce< / span > < / tt > is the time until the torrent will announce itself to the tracker.< / p >
< p > < tt class = "literal" > < span class = "pre" > total_download< / span > < / tt > and < tt class = "literal" > < span class = "pre" > total_upload< / span > < / tt > is the number of bytes downloaded and
uploaded to all peers, accumulated, < em > this session< / em > only.< / p >
< p > < tt class = "literal" > < span class = "pre" > pieces< / span > < / tt > is the bitmask that representw which pieces we have (set to true) and
the pieces we don't have.< / p >
< p > < tt class = "literal" > < span class = "pre" > total_done< / span > < / tt > is the total number of bytes of the file(s) that we have.< / p >
< / div >
< div class = "section" id = "get-download-queue" >
2003-11-26 17:02:17 +01:00
< h3 > < a class = "toc-backref" href = "#id15" name = "get-download-queue" > get_download_queue()< / a > < / h3 >
2003-11-23 04:00:45 +01:00
< p > < tt class = "literal" > < span class = "pre" > get_download_queue()< / span > < / tt > takes a non-const reference to a vector which it will fill
2003-11-02 22:06:50 +01:00
information about pieces that are partially downloaded or not downloaded at all but partially
2003-11-23 04:00:45 +01:00
requested. The entry in the vector (< tt class = "literal" > < span class = "pre" > partial_piece_info< / span > < / tt > ) looks like this:< / p >
< pre class = "literal-block" >
2003-11-02 22:06:50 +01:00
struct partial_piece_info
{
2003-11-23 04:00:45 +01:00
enum { max_blocks_per_piece };
int piece_index;
int blocks_in_piece;
std::bitset< max_blocks_per_piece> requested_blocks;
std::bitset< max_blocks_per_piece> finished_blocks;
peer_id peer[max_blocks_per_piece];
int num_downloads[max_blocks_per_piece];
2003-11-02 22:06:50 +01:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > < tt class = "literal" > < span class = "pre" > piece_index< / span > < / tt > is the index of the piece in question. < tt class = "literal" > < span class = "pre" > blocks_in_piece< / span > < / tt > is the
2003-11-02 22:06:50 +01:00
number of blocks in this particular piece. This number will be the same for most pieces, but
2003-11-23 04:00:45 +01:00
the last piece may have fewer blocks than the standard pieces.< / p >
< p > < tt class = "literal" > < span class = "pre" > requested_blocks< / span > < / tt > is a bitset with one bit per block in the piece. If a bit is set, it
2003-11-02 22:06:50 +01:00
means that that block has been requested, but not necessarily fully downloaded yet. To know
2003-11-23 04:00:45 +01:00
from whom the block has been requested, have a look in the < tt class = "literal" > < span class = "pre" > peer< / span > < / tt > array. The bit-index
in the < tt class = "literal" > < span class = "pre" > requested_blocks< / span > < / tt > and < tt class = "literal" > < span class = "pre" > finished_blocks< / span > < / tt > correspons to the array-index into
< tt class = "literal" > < span class = "pre" > peers< / span > < / tt > and < tt class = "literal" > < span class = "pre" > num_downloads< / span > < / tt > . The array of peers is contains the id of the
2003-11-02 22:06:50 +01:00
peer the piece was requested from. If a piece hasn't been requested (the bit in
2003-11-23 04:00:45 +01:00
< tt class = "literal" > < span class = "pre" > requested_blocks< / span > < / tt > is not set) the peer array entry will be undefined.< / p >
< p > The < tt class = "literal" > < span class = "pre" > finished_blocks< / span > < / tt > is a bitset where each bit says if the block is fully downloaded
or not. And the < tt class = "literal" > < span class = "pre" > num_downloads< / span > < / tt > array says how many times that block has been downloaded.
2003-11-02 22:06:50 +01:00
When a piece fails a hash verification, single blocks may be redownloaded to see if the hash teast
2003-11-23 04:00:45 +01:00
may pass then.< / p >
< / div >
< div class = "section" id = "get-peer-info" >
2003-11-26 17:02:17 +01:00
< h3 > < a class = "toc-backref" href = "#id16" name = "get-peer-info" > get_peer_info()< / a > < / h3 >
2003-11-23 04:00:45 +01:00
< p > < tt class = "literal" > < span class = "pre" > get_peer_info()< / span > < / tt > takes a reference to a vector that will be cleared and filled
2003-10-23 01:00:57 +02:00
with one entry for each peer connected to this torrent. Each entry contains information about
2003-11-23 04:00:45 +01:00
that particular peer. It contains the following information:< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
struct peer_info
{
2003-11-23 04:00:45 +01:00
enum
{
interesting = 0x1,
choked = 0x2,
remote_interested = 0x4,
remote_choked = 0x8
};
unsigned int flags;
address ip;
float up_speed;
float down_speed;
unsigned int total_download;
unsigned int total_upload;
peer_id id;
std::vector< bool> pieces;
int upload_limit;
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > The < tt class = "literal" > < span class = "pre" > flags< / span > < / tt > attribute tells you in which state the peer is. It is set to
any combination of the four enums above. Where < tt class = "literal" > < span class = "pre" > interesting< / span > < / tt > means that we
are interested in pieces from this peer. < tt class = "literal" > < span class = "pre" > choked< / span > < / tt > means that < strong > we< / strong > have
choked this peer. < tt class = "literal" > < span class = "pre" > remote_interested< / span > < / tt > and < tt class = "literal" > < span class = "pre" > remote_choked< / span > < / tt > means the
2003-10-23 01:00:57 +02:00
same thing but that the peer is interested in pieces from us and the peer has choked
2003-11-23 04:00:45 +01:00
< strong > us< / strong > .< / p >
< p > The < tt class = "literal" > < span class = "pre" > ip< / span > < / tt > field is the IP-address to this peer. Its type is a wrapper around the
actual address and the port number. See < a class = "reference" href = "#address" > address< / a > class.< / p >
< p > < tt class = "literal" > < span class = "pre" > up_speed< / span > < / tt > and < tt class = "literal" > < span class = "pre" > down_speed< / span > < / tt > is the current upload and download speed
we have to and from this peer. These figures are updated aproximately once every second.< / p >
< p > < tt class = "literal" > < span class = "pre" > total_download< / span > < / tt > and < tt class = "literal" > < span class = "pre" > total_upload< / span > < / tt > are the total number of bytes downloaded
2003-10-30 00:28:09 +01:00
from and uploaded to this peer. These numbers do not include the protocol chatter, but only
2003-11-23 04:00:45 +01:00
the payload data.< / p >
< p > < tt class = "literal" > < span class = "pre" > id< / span > < / tt > is the peer's id as used in the bit torrent protocol. This id can be used to
2003-10-23 01:00:57 +02:00
extract 'fingerprints' from the peer. Sometimes it can tell you which client the peer
2003-11-23 04:00:45 +01:00
is using.< / p >
< p > < tt class = "literal" > < span class = "pre" > pieces< / span > < / tt > is a vector of booleans that has as many entries as there are pieces
2003-10-23 01:00:57 +02:00
in the torrent. Each boolean tells you if the peer has that piece (if it's set to true)
2003-11-23 04:00:45 +01:00
or if the peer miss that piece (set to false).< / p >
< p > < tt class = "literal" > < span class = "pre" > upload_limit< / span > < / tt > is the number of bytes per second we are allowed to send to this
peer every second. It may be -1 if there's no limit.< / p >
< / div >
< / div >
< div class = "section" id = "address" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id17" name = "address" > address< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > The < tt class = "literal" > < span class = "pre" > address< / span > < / tt > class represents a name of a network endpoint (usually referred to as
IP-address) and a port number. This is the same thing as a < tt class = "literal" > < span class = "pre" > sockaddr_in< / span > < / tt > would contain.
Its declaration looks like this:< / p >
< pre class = "literal-block" >
class address
{
public:
address();
address(
unsigned char a
, unsigned char b
, unsigned char c
, unsigned char d
, unsigned short port);
address(unsigned int addr, unsigned short port);
address(const std::string& addr, unsigned short port);
address(const address& a);
~address();
std::string as_string() const;
unsigned int ip() const;
unsigned short port() const;
bool operator< (const address& a) const;
bool operator!=(const address& a) const;
bool operator==(const address& a) const;
};
< / pre >
< p > It is less-than comparable to make it possible to use it as a key in a map. < tt class = "literal" > < span class = "pre" > as_string()< / span > < / tt > may block
while it does the DNS lookup, it returns a string that points to the address represented by the object.< / p >
< p > < tt class = "literal" > < span class = "pre" > ip()< / span > < / tt > will return the 32-bit ip-address as an integer. < tt class = "literal" > < span class = "pre" > port()< / span > < / tt > returns the port number.< / p >
< / div >
< div class = "section" id = "http-settings" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id18" name = "http-settings" > http_settings< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > You have some control over tracker requests through the < tt class = "literal" > < span class = "pre" > http_settings< / span > < / tt > object. You
create it and fill it with your settings and the use < tt class = "literal" > < span class = "pre" > session::set_http_settings()< / span > < / tt >
2003-10-23 01:00:57 +02:00
to apply them. You have control over proxy and authorization settings and also the user-agent
2003-11-23 04:00:45 +01:00
that will be sent to the tracker. The user-agent is a good way to identify your client.< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
struct http_settings
{
2003-11-23 04:00:45 +01:00
http_settings();
std::string proxy_ip;
int proxy_port;
std::string proxy_login;
std::string proxy_password;
std::string user_agent;
int tracker_timeout;
int tracker_maximum_response_length;
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > < tt class = "literal" > < span class = "pre" > tracker_timeout< / span > < / tt > is the number of seconds the tracker connection will
2003-11-09 19:17:09 +01:00
wait until it considers the tracker to have timed-out. Default value is 10
2003-11-23 04:00:45 +01:00
seconds.< / p >
< p > < tt class = "literal" > < span class = "pre" > tracker_maximum_response_length< / span > < / tt > is the maximum number of bytes in a
2003-10-25 03:31:06 +02:00
tracker response. If a response size passes this number it will be rejected
and the connection will be closed. On gzipped responses this size is measured
on the uncompressed data. So, if you get 20 bytes of gzip response that'll
expand to 2 megs, it will be interrupted before the entire response has been
uncompressed (given your limit is lower than 2 megs). Default limit is
2003-11-23 04:00:45 +01:00
1 megabyte.< / p >
< / div >
< div class = "section" id = "big-number" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id19" name = "big-number" > big_number< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > Both the < tt class = "literal" > < span class = "pre" > peer_id< / span > < / tt > and < tt class = "literal" > < span class = "pre" > sha1_hash< / span > < / tt > types are typedefs of the class
< tt class = "literal" > < span class = "pre" > big_number< / span > < / tt > . It represents 20 bytes of data. Its synopsis follows:< / p >
< pre class = "literal-block" >
2003-10-23 01:00:57 +02:00
class big_number
{
public:
2003-11-23 04:00:45 +01:00
bool operator==(const big_number& n) const;
bool operator!=(const big_number& n) const;
bool operator< (const big_number& n) const;
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
const unsigned char* begin() const;
const unsigned char* end() const;
2003-10-23 01:00:57 +02:00
2003-11-23 04:00:45 +01:00
unsigned char* begin();
unsigned char* end();
2003-10-23 01:00:57 +02:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > The iterators gives you access to individual bytes.< / p >
< / div >
< div class = "section" id = "hasher" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id20" name = "hasher" > hasher< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< p > This class creates sha1-hashes. Its declaration looks like this:< / p >
< pre class = "literal-block" >
2003-10-30 00:28:09 +01:00
class hasher
{
public:
2003-11-23 04:00:45 +01:00
hasher();
2003-10-30 00:28:09 +01:00
2003-11-23 04:00:45 +01:00
void update(const char* data, unsigned int len);
sha1_hash final();
void reset();
2003-10-30 00:28:09 +01:00
};
< / pre >
2003-11-23 04:00:45 +01:00
< p > You use it by first instantiating it, then call < tt class = "literal" > < span class = "pre" > update()< / span > < / tt > to feed it
2003-10-30 00:28:09 +01:00
with data. i.e. you don't have to keep the entire buffer of which you want to
create the hash in memory. You can feed the hasher parts of it at a time. When
2003-11-23 04:00:45 +01:00
You have fed the hasher with all the data, you call < tt class = "literal" > < span class = "pre" > final()< / span > < / tt > and it
will return the sha1-hash of the data.< / p >
< p > If you want to reuse the hasher object once you have created a hash, you have to
call < tt class = "literal" > < span class = "pre" > reset()< / span > < / tt > to reinitialize it.< / p >
< p > The sha1-algorithm used was implemented by Steve Reid and released as public domain.
For more info, see < tt class = "literal" > < span class = "pre" > src/sha1.c< / span > < / tt > .< / p >
< / div >
< div class = "section" id = "example-usage" >
2003-11-26 17:02:17 +01:00
< h2 > < a class = "toc-backref" href = "#id21" name = "example-usage" > example usage< / a > < / h2 >
2003-11-23 04:00:45 +01:00
< div class = "section" id = "dump-torrent" >
2003-11-26 17:02:17 +01:00
< h3 > < a class = "toc-backref" href = "#id22" name = "dump-torrent" > dump_torrent< / a > < / h3 >
2003-11-23 04:00:45 +01:00
< p > This is an example of a program that will take a torrent-file as a parameter and
print information about it to std out:< / p >
< pre class = "literal-block" >
#include < iostream>
#include < fstream>
#include < iterator>
#include < exception>
#include < vector>
#include < iomanip>
#include " libtorrent/entry.hpp"
#include " libtorrent/bencode.hpp"
#include " libtorrent/session.hpp"
#include " libtorrent/http_settings.hpp"
int main(int argc, char* argv[])
{
using namespace libtorrent;
if (argc != 2)
{
std::cerr < < " usage: dump_torrent torrent-file\n" ;
return 1;
}
try
{
std::ifstream in(argv[1], std::ios_base::binary);
in.unsetf(std::ios_base::skipws);
entry e = bdecode(std::istream_iterator< char> (in), std::istream_iterator< char> ());
torrent_info t(e);
// print info about torrent
std::cout < < " \n\n----- torrent file info -----\n\n" ;
std::cout < < " trackers:\n" ;
for (std::vector< announce_entry> ::const_iterator i = t.trackers().begin();
i != t.trackers().end();
++i)
{
std::cout < < i-> tier < < " : " < < i-> url < < " \n" ;
}
std::cout < < " number of pieces: " < < t.num_pieces() < < " \n" ;
std::cout < < " piece length: " < < t.piece_length() < < " \n" ;
std::cout < < " files:\n" ;
for (torrent_info::file_iterator i = t.begin_files();
i != t.end_files();
++i)
{
std::cout < < " " < < std::setw(11) < < i-> size
< < " " < < i-> path < < " " < < i-> filename < < " \n" ;
}
}
catch (std::exception& e)
{
std::cout < < e.what() < < " \n" ;
}
return 0;
}
< / pre >
< / div >
< div class = "section" id = "simple-client" >
2003-11-26 17:02:17 +01:00
< h3 > < a class = "toc-backref" href = "#id23" name = "simple-client" > simple client< / a > < / h3 >
2003-11-23 04:00:45 +01:00
< p > This is a simple client. It doesn't have much output to keep it simple:< / p >
< pre class = "literal-block" >
#include < iostream>
#include < fstream>
#include < iterator>
#include < exception>
#include < boost/format.hpp>
#include < boost/date_time/posix_time/posix_time.hpp>
#include " libtorrent/entry.hpp"
#include " libtorrent/bencode.hpp"
#include " libtorrent/session.hpp"
#include " libtorrent/http_settings.hpp"
int main(int argc, char* argv[])
{
using namespace libtorrent;
if (argc != 2)
{
std::cerr < < " usage: ./simple_cient torrent-file\n"
" to stop the client, press return.\n" ;
return 1;
}
try
{
session s(6881, " E\x1" );
std::ifstream in(argv[1], std::ios_base::binary);
in.unsetf(std::ios_base::skipws);
entry e = bdecode(std::istream_iterator< char> (in), std::istream_iterator< char> ());
torrent_info t(e);
s.add_torrent(t, " " );
// wait for the user to end
char a;
std::cin.unsetf(std::ios_base::skipws);
std::cin > > a;
}
catch (std::exception& e)
{
std::cout < < e.what() < < " \n" ;
}
return 0;
}
< / pre >
< / div >
< / div >
< / div >
< div class = "section" id = "feedback" >
2003-11-26 17:02:17 +01:00
< h1 > < a class = "toc-backref" href = "#id24" name = "feedback" > Feedback< / a > < / h1 >
2003-11-23 04:00:45 +01:00
< p > There's a < a class = "reference" href = "http://lists.sourceforge.net/lists/listinfo/libtorrent-discuss" > mailing list< / a > .< / p >
< p > You can usually find me as hydri in < tt class = "literal" > < span class = "pre" > #btports< / span > < span class = "pre" > @ < / span > < span class = "pre" > irc.freenode.net< / span > < / tt > .< / p >
< / div >
< div class = "section" id = "aknowledgements" >
2003-11-26 17:02:17 +01:00
< h1 > < a class = "toc-backref" href = "#id25" name = "aknowledgements" > Aknowledgements< / a > < / h1 >
< p > Written by Arvid Norberg and Daniel Wallin. Copyright (c) 2003< / p >
< p > Project is hosted by sourceforge.< / p >
< p > < a class = "reference" href = "http://sourceforge.net" > < img alt = "sf_logo" src = "http://sourceforge.net/sflogo.php?group_id=7994" / > < / a > < / p >
2003-11-23 04:00:45 +01:00
< / div >
< / div >
< / body >
< / html >