Written by Arvid Norberg and Daniel Wallin. Copyright (c) 2003
-
Contributions by Magnus Jonsson
+
Written by Arvid Norberg. Copyright (c) 2003
+
Contributions by Magnus Jonsson and Daniel Wallin
Thanks to Reimond Retz for bugfixes, suggestions and testing
Project is hosted by sourceforge.
diff --git a/docs/index.rst b/docs/index.rst
index ac6d8f27a..1de2da43b 100755
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -60,9 +60,9 @@ You can usually find me as hydri in ``#btports @ irc.freenode.net``.
Aknowledgements
===============
-Written by Arvid Norberg and Daniel Wallin. Copyright (c) 2003
+Written by Arvid Norberg. Copyright (c) 2003
-Contributions by Magnus Jonsson
+Contributions by Magnus Jonsson and Daniel Wallin
Thanks to Reimond Retz for bugfixes, suggestions and testing
diff --git a/docs/manual.html b/docs/manual.html
index 4ed7e59bc..ab70e0ca5 100755
--- a/docs/manual.html
+++ b/docs/manual.html
@@ -13,57 +13,57 @@
@@ -223,7 +224,7 @@ The main thread will be idle as long it doesn't have any torrents to participate
You add torrents through the add_torrent()-function where you give an
object representing the information found in the torrent file and the path where you
want to save the files. The save_path will be prepended to the directory-
-structure in the torrent-file. add_torrent will throw duplicate_torrent exception
+structure in the torrent-file. add_torrent will throw duplicate_torrent exception
if the torrent already exists in the session.
The optional last parameter, resume_data can be given if up to date fast-resume data
is available. The fast-resume data can be acquired from a running torrent by calling
@@ -232,7 +233,7 @@ is available. The fast-resume data can be acquired from a running torrent by cal
the tracker that we've stopped participating in the swarm.
If the torrent you are trying to add already exists in the session (is either queued
for checking, being checked or downloading) add_torrent() will throw
-duplicate_torrent which derives from std::exception.
The difference between the two constructors is that one of them takes a fingerprint
as argument. If this is ommited, the client will get a default fingerprint stating
the version of libtorrent. The fingerprint is a short string that will be used in
@@ -246,7 +247,6 @@ If some trackers are down, they will timout. All this before the destructor of s
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
timeout can be set with set_http_settings().
-
How to parse a torrent file and create a torrent_info object is described below.
The torrent_handle returned by add_torrent can be used to retrieve information
about the torrent's progress, its peers etc. It is also used to abort a torrent.
The constructor takes a listen port as argument, if the given port is busy it will
@@ -486,6 +486,7 @@ struct torrent_handle
boost::filsystem::path save_path() const;
void set_max_uploads(int max_uploads);
+ void set_max_connections(int max_connections);
sha1_hash info_hash() const;
@@ -517,6 +518,10 @@ as a standard client.
info_hash() returns the info hash for the torrent.
set_max_uploads() sets the maximum number of peers that's unchoked at the same time on this
torrent. If you set this to -1, there will be no limit.
+
set_max_connections() sets the maximum number of connection this torrent will open. If all
+connections are used up, incoming connections may be refused or poor connections may be closed.
+This must be at least 2. The default is unlimited number of connections. If -1 is given to the
+function, it means unlimited.
write_resume_data() generates fast-resume data and returns it as an entry. This entry
is suitable for being bencoded. For more information about how fast-resume works, see fast resume.
It may throw invalid_handle if the torrent handle is invalid.
@@ -752,7 +757,7 @@ the total number of bytes in this block.
Returns a const reference to the torrent_info object associated with this torrent.
+
Returns a const reference to the torrent_info object associated with this torrent.
This reference is valid as long as the torrent_handle is valid, no longer. If the
torrent_handle is invalid, invalid_handle exception will be thrown.
@@ -1440,8 +1445,8 @@ with future versions of bittorrent.
Written by Arvid Norberg and Daniel Wallin. Copyright (c) 2003
-
Contributions by Magnus Jonsson
+
Written by Arvid Norberg. Copyright (c) 2003
+
Contributions by Magnus Jonsson and Daniel Wallin
Thanks to Reimond Retz for bugfixes, suggestions and testing
Project is hosted by sourceforge.
diff --git a/docs/manual.rst b/docs/manual.rst
index 8c5143a45..ec6ff858b 100755
--- a/docs/manual.rst
+++ b/docs/manual.rst
@@ -40,10 +40,13 @@ The current state includes the following features:
* Supports the extension protocol `described by Nolar`__. See extensions_.
* Supports files > 2 gigabytes (currently only on windows).
* Supports the ``no_peer_id=1`` extension that will ease the load off trackers.
+ * Supports the `udp-tracker protocol`__.
__ http://home.elp.rr.com/tur/multitracker-spec.txt
.. _Azureus: http://azureus.sourceforge.net
__ http://nolar.com/azureus/extended.htm
+__ udp_tracker_protocol.html
+
Functions that are yet to be implemented:
@@ -171,7 +174,7 @@ The main thread will be idle as long it doesn't have any torrents to participate
You add torrents through the ``add_torrent()``-function where you give an
object representing the information found in the torrent file and the path where you
want to save the files. The ``save_path`` will be prepended to the directory-
-structure in the torrent-file. ``add_torrent`` will throw ``duplicate_torrent`` exception
+structure in the torrent-file. ``add_torrent`` will throw duplicate_torrent_ exception
if the torrent already exists in the session.
The optional last parameter, ``resume_data`` can be given if up to date fast-resume data
@@ -183,7 +186,7 @@ the tracker that we've stopped participating in the swarm.
If the torrent you are trying to add already exists in the session (is either queued
for checking, being checked or downloading) ``add_torrent()`` will throw
-``duplicate_torrent`` which derives from ``std::exception``.
+duplicate_torrent_ which derives from ``std::exception``.
The difference between the two constructors is that one of them takes a fingerprint
as argument. If this is ommited, the client will get a default fingerprint stating
@@ -201,8 +204,6 @@ returns. So, it's adviced that any kind of interface (such as windows) are close
destructing the sessoin object. Because it can take a few second for it to finish. The
timeout can be set with ``set_http_settings()``.
-How to parse a torrent file and create a ``torrent_info`` object is described below.
-
The torrent_handle_ returned by ``add_torrent`` can be used to retrieve information
about the torrent's progress, its peers etc. It is also used to abort a torrent.
@@ -487,6 +488,7 @@ Its declaration looks like this::
boost::filsystem::path save_path() const;
void set_max_uploads(int max_uploads);
+ void set_max_connections(int max_connections);
sha1_hash info_hash() const;
@@ -526,6 +528,11 @@ as a standard client.
``set_max_uploads()`` sets the maximum number of peers that's unchoked at the same time on this
torrent. If you set this to -1, there will be no limit.
+``set_max_connections()`` sets the maximum number of connection this torrent will open. If all
+connections are used up, incoming connections may be refused or poor connections may be closed.
+This must be at least 2. The default is unlimited number of connections. If -1 is given to the
+function, it means unlimited.
+
``write_resume_data()`` generates fast-resume data and returns it as an entry. This entry
is suitable for being bencoded. For more information about how fast-resume works, see `fast resume`_.
It may throw invalid_handle_ if the torrent handle is invalid.
@@ -772,7 +779,7 @@ the total number of bytes in this block.
get_torrent_info()
------------------
-Returns a const reference to the ``torrent_info`` object associated with this torrent.
+Returns a const reference to the torrent_info_ object associated with this torrent.
This reference is valid as long as the torrent_handle_ is valid, no longer. If the
torrent_handle_ is invalid, invalid_handle_ exception will be thrown.
@@ -1514,9 +1521,9 @@ with future versions of bittorrent.
Aknowledgements
===============
-Written by Arvid Norberg and Daniel Wallin. Copyright (c) 2003
+Written by Arvid Norberg. Copyright (c) 2003
-Contributions by Magnus Jonsson
+Contributions by Magnus Jonsson and Daniel Wallin
Thanks to Reimond Retz for bugfixes, suggestions and testing
diff --git a/docs/udp_tracker_protocol.html b/docs/udp_tracker_protocol.html
new file mode 100644
index 000000000..921f5f490
--- /dev/null
+++ b/docs/udp_tracker_protocol.html
@@ -0,0 +1,381 @@
+
+
+
+
+
+
+Bittorrent udp-tracker protocol extension
+
+
+
+
+
Bittorrent udp-tracker protocol extension
+
A tracker with the protocol "udp://" in its URI
+is supposed to be contacted using this protocol.
Describes the type of packet, in this
+case it should be 0, for connect.
+If 3 (for error) see errors.
+
+
int32_t
+
transaction_id
+
Must match the transaction_id sent
+from the client.
+
+
int64_t
+
connection_id
+
A connection id, this is used when
+further information is exchanged with
+the tracker, to identify you.
+This connection id can be reused for
+multiple requests, but if it's cached
+for too long, it will not be valid
+anymore.