diff --git a/docs/building.html b/docs/building.html index e639adbd7..83eec016e 100644 --- a/docs/building.html +++ b/docs/building.html @@ -3,7 +3,7 @@ - + libtorrent manual @@ -31,8 +31,8 @@ -
-

downloading and building

+
+

downloading and building

To acquire the latest version of libtorrent, you'll have to grab it from CVS. You'll find instructions on how to do this here (see Anonymous CVS access).

The build systems supported "out of the box" in libtorrent are boost-build v2 @@ -41,8 +41,8 @@ following these instructions, you can usually get help in the irc.freenode.net.

If you want to build the cvs version on Ubuntu (and possibly other Linux distros), see this document.

-
-

building with BBv2

+
+

building with BBv2

The primary reason to use boost-build is that it will automatically build the dependent boost libraries with the correct compiler settings, in order to ensure that the build targets are link compatible (see boost guidelines @@ -51,8 +51,8 @@ for some details on this issue).

source package. Having boost installed via some package system is usually not enough (and even if it is enough, the necessary environment variables are usually not set by the package installer).

-
-

Step 1: Download boost

+
+

Step 1: Download boost

You'll find boost here.

Extract the archive to some directory where you want it. For the sake of this guide, let's assume you extract the package to c:\boost_1_33_1 (I'm using @@ -62,8 +62,8 @@ in order to build libtorrent.

If you use 1.32, you need to download BBv2 separately, so for now, let's assume you will use version 1.33.1.

-
-

Step 2: Setup BBv2

+
+

Step 2: Setup BBv2

First you need to build bjam. You do this by opening a terminal (In windows, run cmd). Change directory to c:\boost_1_33_1\tools\build\jam_src. Then run the script called @@ -115,8 +115,8 @@ using darwin : 4.0 : g++-4.0 ;

Note that the spaces around the semi-colons and colons are important!

Also see the official installation instructions.

-
-

Step 3: Building libtorrent

+
+

Step 3: Building libtorrent

When building libtorrent, the Jamfile expects the environment variable BOOST_ROOT to be set to the boost installation directory. It uses this to find the boost libraries it depends on, so they can be built and their headers @@ -240,8 +240,8 @@ logging=none dht-support=on dht-support=logging dht-support=off

-
-

building with autotools

+
+

building with autotools

First of all, you need to install automake and autoconf. Many unix/linux systems comes with these preinstalled.

The prerequisites for building libtorrent is boost.thread, boost.date_time @@ -252,8 +252,8 @@ boost.integer, boost.iterator, boost.tuple, boost.array, boost.function, boost.smart_ptr, boost.preprocessor, boost.static_assert.

If you want to build the client_test example, you'll also need boost.regex and boost.program_options.

-
-

Step 1: Generating the build system

+
+

Step 1: Generating the build system

No build system is present if libtorrent is checked out from CVS - it needs to be generated first. If you're building from a released tarball, you may skip directly to Step 2: Running configure.

@@ -268,8 +268,8 @@ autoconf

On darwin/OSX you have to run glibtoolize instead of libtoolize.

-
-

Step 2: Running configure

+
+

Step 2: Running configure

In your shell, change directory to the libtorrent directory and run ./configure. This will look for libraries and C++ features that libtorrent is dependent on. If something is missing or can't be found it will print an @@ -317,8 +317,8 @@ checking for main in -lboost_thread... yes directory contains spaces. Make sure you either rename the directories with spaces in their names to remove the spaces or move the libtorrent directory.

-
-

Creating a debug build

+
+

Creating a debug build

To tell configure to build a debug version (with debug info, asserts and invariant checks enabled), you have to run the configure script with the following option:

@@ -326,8 +326,8 @@ with the following option:

./configure --enable-debug=yes
-
-

Creating a release build

+
+

Creating a release build

To tell the configure to build a release version (without debug info, asserts and invariant checks), you have to run the configure script with the following option:

@@ -336,8 +336,8 @@ with the following option:

The above option make use of -DNDEBUG, which is used throughout libtorrent.

-
-

Step 3: Building libtorrent

+
+

Step 3: Building libtorrent

Once the configure script is run successfully, you just type make and libtorrent, the examples and the tests will be built.

When libtorrent is built it may be a good idea to run the tests, you do this @@ -351,8 +351,8 @@ make

-
-

building with other build systems

+
+

building with other build systems

If you're making your own project file, note that there are two versions of the file abstraction. There's one file_win.cpp which relies on windows file API that supports files larger than 2 Gigabytes. This does not work in @@ -367,8 +367,8 @@ options "force conformance in for loop scope", "treat wchar_t as type" and "Enable Run-Time Type Info" to Yes. For a detailed description on how to build libtorrent with VS 2005, see this document.

-
-

build configurations

+
+

build configurations

By default libtorrent is built In debug mode, and will have pretty expensive invariant checks and asserts built into it. If you want to disable such checks (you want to do that in a release build) you can see the table below for which diff --git a/docs/client_test.html b/docs/client_test.html index 5e23661a0..18dbaa233 100644 --- a/docs/client_test.html +++ b/docs/client_test.html @@ -3,13 +3,14 @@ - + client_test example program

client_test example program

+

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:

@@ -26,7 +27,7 @@ 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).

While running, the client_test sample will look something like this:

-
client_test.png
+client_test.png

The commands available in the client are:

  • q quits the client (there will be a delay while the client waits @@ -47,7 +48,7 @@ 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.

    -
    unicode_support.png
    +unicode_support.png

    There's unicode support on linux, MacOS X and Windows.

diff --git a/docs/dht_extensions.html b/docs/dht_extensions.html index 12188037d..faa1fb3a8 100644 --- a/docs/dht_extensions.html +++ b/docs/dht_extensions.html @@ -3,13 +3,14 @@ - +
+ @@ -18,11 +19,11 @@
Arvid Norberg, arvid@rasterbar.com
-
-

Mainline DHT extensions

+
+

Mainline DHT extensions

libtorrent implements a few extensions to the Mainline DHT protocol.

-
-

client identification

+
+

client identification

In each DHT packet, an extra key is inserted named "v". This is a string describing the client and version used. This can help alot when debugging and finding errors in client implementations. The string is encoded as four @@ -50,10 +51,10 @@ as a binary number describing the client version.

-
-

IPv6 support

+
+

IPv6 support

The only DHT messages that don't support IPv6 is the nodes reply. It -encodes all the contacts as 6 bytes sequences packed together in sequence in +encodes all the contacts as 6 bytes sequences packed together in sequence in string. The problem is that IPv6 endpoints cannot be encoded as 6 bytes, but needs 18 bytes. The extension libtorrent applies is to add another key, called nodes2 which is encoded as a list of strings. Each string represents one diff --git a/docs/examples.html b/docs/examples.html index f1a962d71..f7bfa1a42 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -3,7 +3,7 @@ - + libtorrent Examples @@ -30,14 +30,14 @@

-
-

examples

+
+

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 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.

-
-

dump_torrent

+
+

dump_torrent

This is an example of a program that will take a torrent-file as a parameter and print information about it to std out:

@@ -103,7 +103,7 @@ int main(int argc, char* argv[])
                         std::cout << "  " << std::setw(11) << i->size
                                 << " " << i->path.string() << "\n";
                 }
-                
+
         }
         catch (std::exception& e)
         {
@@ -114,8 +114,8 @@ int main(int argc, char* argv[])
 }
 
-
-

simple client

+
+

simple client

This is a simple client. It doesn't have much output to keep it simple:

 #include <iostream>
@@ -151,7 +151,7 @@ int main(int argc, char* argv[])
                 entry e = bdecode(std::istream_iterator<char>(in)
                         , std::istream_iterator<char>());
                 s.add_torrent(torrent_info(e), "");
-                        
+
                 // wait for the user to end
                 char a;
                 std::cin.unsetf(std::ios_base::skipws);
@@ -165,8 +165,8 @@ int main(int argc, char* argv[])
 }
 
-
-

make_torrent

+
+

make_torrent

Shows how to create a torrent from a directory tree:

 #include <iostream>
diff --git a/docs/extension_protocol.html b/docs/extension_protocol.html
index 5b6161ad1..cbea09cfa 100644
--- a/docs/extension_protocol.html
+++ b/docs/extension_protocol.html
@@ -3,13 +3,14 @@
 
 
 
-
+
 
 
 
 
 
 
+ @@ -19,8 +20,8 @@ Ludvig Strigeus, ludde@utorrent.com
-
-

extension protocol for bittorrent

+
+

extension protocol for bittorrent

The intention of this protocol is to provide a simple and thin transport for extensions to the bittorrent protocol. Supporting this protocol makes it easy to add new extensions without interfering with the standard @@ -80,8 +81,8 @@ message as specified by the handshake. -

-

handshake message

+
+

handshake message

The payload of the handshake message is a bencoded dictionary. All items in the dictionary are optional. Any unknown names should be ignored by the client. All parts of the dictionary are case sensitive. @@ -215,8 +216,8 @@ for the actual extensions to the bittorrent protocol and the extensions named in the example above (such as p) are just examples of possible extensions.

-
-

rationale

+
+

rationale

The reason why the extension messages' IDs would be defined in the handshake is to avoid having a global registry of message IDs. Instead the names of the extension messages requires unique names, which is much easier to do without diff --git a/docs/features.html b/docs/features.html index 7261a4e6e..611c02dfd 100644 --- a/docs/features.html +++ b/docs/features.html @@ -3,7 +3,7 @@ - + libtorrent manual @@ -28,8 +28,8 @@

  • license
  • -
    -

    introduction

    +
    +

    introduction

    libtorrent is a C++ library that aims to be a good alternative to all the other bittorrent implementations around. It is a library and not a full featured client, although it comes with a working @@ -41,8 +41,8 @@ example client.

  • to be very easy to use
  • -
    -

    features

    +
    +

    features

    libtorrent is still being developed, however it is stable. It is an ongoing project (including this documentation). The current state includes the following features:

    @@ -90,8 +90,8 @@ want to download. being connected
    -
    -

    portability

    +
    +

    portability

    libtorrent is portable at least among Windows, MacOS X and other UNIX-systems. It uses Boost.Thread, Boost.Filesystem, Boost.Date_time and various other boost libraries as well as zlib (shipped) and asio (shipped). At least version @@ -113,8 +113,8 @@ epoll on linux and kqueue on MacOS X and BSD.

  • msvc6
  • -
    -

    license

    +
    +

    license

    libtorrent is released under the BSD-license.

    This means that you can use the library in your project without having to release its source code. The only requirement is that you give credit diff --git a/docs/index.html b/docs/index.html index 0ece73625..e41f965cb 100755 --- a/docs/index.html +++ b/docs/index.html @@ -3,12 +3,14 @@ - +

    + + -
    -

    libtorrent

    +
    +

    libtorrent

    libtorrent is a C++ library that aims to be a good alternative to all the other bittorrent implementations around. It is a library and not a full featured client, although it comes with a working @@ -54,8 +56,8 @@ library and not a full featured client, although it comes with a working

  • to be memory efficient
  • to be very easy to use
  • -
    -
    -

    add_torrent()

    +
    +

    add_torrent()

     torrent_handle add_torrent(
    @@ -382,8 +382,8 @@ optional name argumen
     torrent. In case it's not 0, the name is used for the torrent as long as it doesn't
     have metadata. See torrent_handle::name.

    -
    -

    remove_torrent()

    +
    +

    remove_torrent()

     void remove_torrent(torrent_handle const& h);
    @@ -392,8 +392,8 @@ void remove_torrent(torrent_handle const& h);
     

    remove_torrent() will close all peer connections associated with the torrent and tell the tracker that we've stopped participating in the swarm.

    -
    -

    set_upload_rate_limit() set_download_rate_limit()

    +
    +

    set_upload_rate_limit() set_download_rate_limit()

     void set_upload_rate_limit(int bytes_per_second);
    @@ -406,8 +406,8 @@ you don't want to limit upload rate, you can set this to -1 (the default).
     set_download_rate_limit() works the same way but for download rate instead
     of upload rate.

    -
    -

    set_max_uploads() set_max_connections()

    +
    +

    set_max_uploads() set_max_connections()

     void set_max_uploads(int limit);
    @@ -420,8 +420,8 @@ minimum of at least two connections per torrent, so if you set a too low
     connections limit, and open too many torrents, the limit will not be met. The
     number of uploads is at least one per torrent.

    -
    -

    set_max_half_open_connections()

    +
    +

    set_max_half_open_connections()

     void set_max_half_open_connections(int limit);
    @@ -437,8 +437,8 @@ and passing -1 as the limit, means to have no limit. When limiting the number
     of simultaneous connection attempts, peers will be put in a queue waiting for
     their turn to get connected.

    -
    -

    set_ip_filter()

    +
    +

    set_ip_filter()

     void set_ip_filter(ip_filter const& filter);
    @@ -449,8 +449,8 @@ connections based on their originating ip address. The default filter will allow
     connections to any ip address. To build a set of rules for which addresses are
     accepted and not, see ip_filter.

    -
    -

    status()

    +
    +

    status()

     session_status status() const;
    @@ -501,8 +501,8 @@ are used to replace the regular nodes in the routing table in case any of them
     becomes unresponsive.

    dht_torrents are the number of torrents tracked by the DHT at the moment.

    -
    -

    is_listening() listen_port() listen_on()

    + -
    -

    pop_alert() set_severity_level()

    +
    +

    pop_alert() set_severity_level()

     std::auto_ptr<alert> pop_alert();
    @@ -542,8 +542,8 @@ void set_severity_level(alert::severity_t s);
     set_severity_level() you can filter how serious the event has to be for you to
     receive it through pop_alert(). For information, see alerts.

    -
    -

    start_dht() stop_dht() set_dht_settings() dht_state()

    +
    +

    start_dht() stop_dht() set_dht_settings() dht_state()

     void start_dht(entry const& startup_state);
    @@ -599,8 +599,8 @@ that are ready to replace a failing node, it will be replaced immediately,
     this limit is only used to clear out nodes that don't have any node that can
     replace them.

    -
    -

    add_dht_node() add_dht_router()

    +
    +

    add_dht_node() add_dht_router()

     void add_dht_node(std::pair<std::string, int> const& node);
    @@ -619,8 +619,8 @@ for bootstrapping, to keep the load off them.

    router.bittorrent.com.

    -
    -

    entry

    +
    +

    entry

    The entry class represents one node in a bencoded hierarchy. It works as a variant type, it can be either a list, a dictionary (std::map), an integer or a string. This is its synopsis:

    @@ -671,20 +671,20 @@ public: dictionary_type const& dict() const; // these functions requires that the entry - // is a dictionary, otherwise they will throw + // is a dictionary, otherwise they will throw entry& operator[](char const* key); entry& operator[](std::string const& key); entry const& operator[](char const* key) const; entry const& operator[](std::string const& key) const; entry* find_key(char const* key); entry const* find_key(char const* key) const; - + void print(std::ostream& os, int indent = 0) const; };

    TODO: finish documentation of entry.

    -
    -

    integer() string() list() dict() type()

    +
    +

    integer() string() list() dict() type()

     integer_type& integer();
    @@ -736,8 +736,8 @@ if (entry* i = torrent_file.find_key("announce"))
     

    To make it easier to extract information from a torrent file, the class torrent_info exists.

    -
    -

    operator[]

    +
    +

    operator[]

     entry& operator[](char const* key);
    @@ -755,8 +755,8 @@ given key, a reference to a newly inserted element at that key.

    existing element at the given key. If the key is not found, it will throw libtorrent::type_error.

    -
    -

    find_key()

    +
    +

    find_key()

     entry* find_key(char const* key);
    @@ -770,8 +770,8 @@ element cannot be found, they will return 0. If an element with the given
     key is found, the return a pointer to it.

    -
    -

    torrent_info

    +
    +

    torrent_info

    The torrent_info has the following synopsis:

     class torrent_info
    @@ -835,8 +835,8 @@ public:
             sha1_hash const& hash_for_piece(unsigned int index) const;
     };
     
    -
    -

    torrent_info()

    +
    +

    torrent_info()

     torrent_info();
    @@ -859,8 +859,8 @@ object from the information found in the given torrent_file. The entry, use bdecode(),
     see bdecode() bencode().

    -
    -

    set_comment() set_piece_size() set_creator() set_hash() add_tracker() add_file()

    +
    +

    set_comment() set_piece_size() set_creator() set_hash() add_tracker() add_file()

     void set_comment(char const* str);
    @@ -892,8 +892,8 @@ of the torrent. The sizecreate_torrent().

    For a complete example of how to create a torrent from a file structure, see make_torrent.

    -
    -

    create_torrent()

    +
    +

    create_torrent()

     entry create_torrent();
    @@ -907,8 +907,8 @@ object.

    Note that a torrent file must include at least one file, and it must have at least one tracker url or at least one DHT node.

    -
    -

    begin_files() end_files() rbegin_files() rend_files()

    +
    +

    begin_files() end_files() rbegin_files() rend_files()

     file_iterator begin_files() const;
    @@ -943,8 +943,8 @@ struct file_entry
     };
     
    -
    -

    num_files() file_at()

    +
    +

    num_files() file_at()

     int num_files() const;
    @@ -954,8 +954,8 @@ file_entry const& file_at(int index) const;
     

    If you need index-access to files you can use the num_files() and file_at() to access files using indices.

    -
    -

    map_block()

    +
    +

    map_block()

     std::vector<file_slice> map_block(int piece, size_type offset
    @@ -980,8 +980,8 @@ as argument. The offsetsize is the number of bytes this range is. The size + offset
     will never be greater than the file size.

    -
    -

    map_file()

    +
    +

    map_file()

     peer_request map_file(int file_index, size_type file_offset
    @@ -1008,8 +1008,8 @@ struct peer_request
     + size is not allowed to be greater than the file size. file_index
     must refer to a valid file, i.e. it cannot be >= num_files().

    -
    -

    url_seeds()

    +
    +

    url_seeds()

     std::vector<std::string> const& url_seeds() const;
    @@ -1022,8 +1022,8 @@ adds one url to the list of url-seeds. Currently, the only transport protocol
     supported for the url is http.

    See HTTP seeding for more information.

    -
    -

    print()

    +
    +

    print()

     void print(std::ostream& os) const;
    @@ -1032,8 +1032,8 @@ void print(std::ostream& os) const;
     

    The print() function is there for debug purposes only. It will print the info from the torrent file to the given outstream.

    -
    -

    trackers()

    +
    +

    trackers()

     std::vector<announce_entry> const& trackers() const;
    @@ -1052,8 +1052,8 @@ struct announce_entry
     };
     
    -
    -

    total_size() piece_length() piece_size() num_pieces()

    +
    +

    total_size() piece_length() piece_size() num_pieces()

     size_type total_size() const;
    @@ -1070,8 +1070,8 @@ the piece index as argument and gives you the exact size of that piece. It will
     be the same as piece_length() except in the case of the last piece, which may
     be smaller.

    -
    -

    hash_for_piece() info_hash()

    +
    +

    hash_for_piece() info_hash()

     size_type piece_size(unsigned int index) const;
    @@ -1084,8 +1084,8 @@ torrent file. For more information on the info_hash() will only return a valid hash if the torrent_info was read from a
     .torrent file or if an entry was created from it (through create_torrent).

    -
    -

    name() comment() creation_date() creator()

    +
    +

    name() comment() creation_date() creator()

     std::string const& name() const;
    @@ -1102,8 +1102,8 @@ in the torrent file, this will return a date of January 1:st 1970.

    creator() returns the creator string in the torrent. If there is no creator string it will return an empty string.

    -
    -

    priv() set_priv()

    +
    +

    priv() set_priv()

     bool priv() const;
    @@ -1114,8 +1114,8 @@ void set_priv(bool v);
     distributed on the trackerless network (the kademlia DHT).

    set_priv() sets or clears the private flag on this torrent.

    -
    -

    nodes()

    +
    +

    nodes()

     std::vector<std::pair<std::string, int> > const& nodes() const;
    @@ -1124,8 +1124,8 @@ std::vector<std::pair<std::string, int> > const& nodes() const;
     

    If this torrent contains any DHT nodes, they are put in this vector in their original form (host name and port number).

    -
    -

    add_node()

    +
    +

    add_node()

     void add_node(std::pair<std::string, int> const& node);
    @@ -1135,8 +1135,8 @@ void add_node(std::pair<std::string, int> const& node);
     be used, by the client, to bootstrap into the DHT network.

    -
    -

    torrent_handle

    +
    +

    torrent_handle

    You will usually have to store your torrent handles somewhere, since it's the object through which you retrieve information about the torrent and aborts the torrent. Its declaration looks like this:

    @@ -1214,8 +1214,8 @@ Since the torrents are processed by a background thread, there is no guarantee that a handle will remain valid between two calls.

    TODO: document filter_piece(), filter_pieces(), is_piece_filtered(), filtered_pieces() and filter_files()

    -
    -

    file_progress()

    +
    +

    file_progress()

     void file_progress(std::vector<float>& fp);
    @@ -1226,8 +1226,8 @@ range [0, 1]) describing the download progress of each file in this torrent.
     The progress values are ordered the same as the files in the torrent_info.
     This operation is not very cheap.

    -
    -

    save_path()

    +
    +

    save_path()

     boost::filesystem::path save_path() const;
    @@ -1236,8 +1236,8 @@ boost::filesystem::path save_path() const;
     

    save_path() returns the path that was given to add_torrent() when this torrent was started.

    -
    -

    move_storage()

    +
    +

    move_storage()

     bool move_storage(boost::filesystem::path const& save_path) const;
    @@ -1249,8 +1249,8 @@ the same drive as the original save path. If the move operation fails, this func
     returns false, otherwise true. Post condition for successful operation is:
     save_path() == save_path.

    -
    -

    force_reannounce()

    +
    +

    force_reannounce()

     void force_reannounce() const;
    @@ -1260,8 +1260,8 @@ void force_reannounce() const;
     peers. If the torrent is invalid, queued or in checking mode, this functions will throw
     invalid_handle.

    -
    -

    connect_peer()

    +
    +

    connect_peer()

     void connect_peer(asio::ip::tcp::endpoint const& adr) const;
    @@ -1273,8 +1273,8 @@ be disconnected. No harm can be done by using this other than an unnecessary con
     attempt is made. If the torrent is uninitialized or in queued or checking mode, this
     will throw invalid_handle.

    -
    -

    name()

    +
    +

    name()

     std::string name() const;
    @@ -1284,8 +1284,8 @@ std::string name() const;
     case the torrent was started without metadata, and hasn't completely received it yet,
     it returns the name given to it when added to the session. See session::add_torrent.

    -
    -

    set_ratio()

    +
    +

    set_ratio()

     void set_ratio(float ratio) const;
    @@ -1299,8 +1299,8 @@ attempt to upload in return for each download. e.g. if set to 2, the client will
     2 bytes for every byte received. The default setting for this is 0, which will make it work
     as a standard client.

    -
    -

    set_upload_limit() set_download_limit()

    +
    +

    set_upload_limit() set_download_limit()

     void set_upload_limit(int limit) const;
    @@ -1314,8 +1314,8 @@ Note that setting a higher limit on a torrent then the global limit (
    -

    set_sequenced_download_threshold()

    +
    +

    set_sequenced_download_threshold()

     void set_sequenced_download_threshold(int threshold);
    @@ -1332,8 +1332,8 @@ in practice.

    negatively in the swarm. It should basically only be used in situations where the random seeks on the disk is the download bottleneck.

    -
    -

    set_peer_upload_limit() set_peer_download_limit()

    +
    +

    set_peer_upload_limit() set_peer_download_limit()

     void set_peer_upload_limit(asio::ip::tcp::endpoint ip, int limit) const;
    @@ -1343,8 +1343,8 @@ void set_peer_download_limit(asio::ip::tcp::endpoint ip, int limit) const;
     

    Works like set_upload_limit and set_download_limit respectively, but controls individual peer instead of the whole torrent.

    -
    -

    pause() resume() is_paused()

    +
    +

    pause() resume() is_paused()

     void pause() const;
    @@ -1358,8 +1358,8 @@ all potential (not connected) peers. You can use file_error_alert.

    -
    -

    is_seed()

    +
    +

    is_seed()

     bool is_seed() const;
    @@ -1367,8 +1367,8 @@ bool is_seed() const;
     

    Returns true if the torrent is in seed mode (i.e. if it has finished downloading).

    -
    -

    has_metadata()

    +
    +

    has_metadata()

     bool has_metadata() const;
    @@ -1379,8 +1379,8 @@ metadata has been downloaded). The only scenario where this can return false is
     was started torrent-less (i.e. with just an info-hash and tracker ip). Note that if the torrent
     doesn't have metadata, the member get_torrent_info() will throw.

    -
    -

    set_tracker_login()

    +
    +

    set_tracker_login()

     void set_tracker_login(std::string const& username
    @@ -1390,8 +1390,8 @@ void set_tracker_login(std::string const& username
     

    set_tracker_login() sets a username and password that will be sent along in the HTTP-request of the tracker announce. Set this if the tracker requires authorization.

    -
    -

    trackers() replace_trackers()

    +
    +

    trackers() replace_trackers()

     std::vector<announce_entry> const& trackers() const;
    @@ -1407,8 +1407,8 @@ a list of the same form as the one returned from force_reannounce().

    -
    -

    add_url_seed()

    +
    +

    add_url_seed()

     void add_url_seed(std::string const& url);
    @@ -1420,8 +1420,8 @@ will connect to the server and try to download pieces from it, unless it's
     paused, queued, checking or seeding.

    See HTTP seeding for more information.

    -
    -

    use_interface()

    +
    +

    use_interface()

     void use_interface(char const* net_interface) const;
    @@ -1431,8 +1431,8 @@ void use_interface(char const* net_interface) const;
     connections. By default, it uses the same interface as the session uses to listen on. The
     parameter can be a string containing an ip-address or a hostname.

    -
    -

    info_hash()

    +
    +

    info_hash()

     sha1_hash info_hash() const;
    @@ -1440,8 +1440,8 @@ sha1_hash info_hash() const;
     

    info_hash() returns the info-hash for the torrent.

    -
    -

    set_max_uploads() set_max_connections()

    +
    +

    set_max_uploads() set_max_connections()

     void set_max_uploads(int max_uploads) const;
    @@ -1455,8 +1455,8 @@ connections are used up, incoming connections may be refused or poor connections
     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()

    +
    +

    write_resume_data()

     entry write_resume_data() const;
    @@ -1478,8 +1478,8 @@ not be ready to write resume data.
     is still downloading! The recommended practice is to first pause the torrent, then generate the
     fast resume data, and then close it down.

    -
    -

    status()

    +
    +

    status()

     torrent_status status() const;
    @@ -1489,8 +1489,8 @@ torrent_status status() const;
     torrent. If the torrent_handle is invalid, it will throw invalid_handle exception.
     See torrent_status.

    -
    -

    get_download_queue()

    +
    +

    get_download_queue()

     void get_download_queue(std::vector<partial_piece_info>& queue) const;
    @@ -1526,8 +1526,8 @@ or not. And the num_downloads
     
    -
    -

    get_peer_info()

    +
    +

    get_peer_info()

     void get_peer_info(std::vector<peer_info>&) const;
    @@ -1538,8 +1538,8 @@ with one entry for each peer connected to this torrent, given the handle is vali
     torrent_handle is invalid, it will throw invalid_handle exception. Each entry in
     the vector contains information about that particular peer. See peer_info.

    -
    -

    get_torrent_info()

    +
    +

    get_torrent_info()

     torrent_info const& get_torrent_info() const;
    @@ -1552,8 +1552,8 @@ exception will be thrown. The torrent may be in a state without metadata only if
     it was started without a .torrent file, i.e. by using the libtorrent extension of
     just supplying a tracker and info-hash.

    -
    -

    is_valid()

    +
    +

    is_valid()

     bool is_valid() const;
    @@ -1568,8 +1568,8 @@ that refers to that torrent will become invalid.

    TODO: document storage

    -
    -

    torrent_status

    +
    +

    torrent_status

    It contains the following fields:

     struct torrent_status
    @@ -1741,8 +1741,8 @@ bytes that each bit in the partia
     (see get_download_queue()). This is typically 16 kB, but it may be
     larger if the pieces are larger.

    -
    -

    peer_info

    +
    +

    peer_info

    It contains the following fields:

     struct peer_info
    @@ -1886,8 +1886,8 @@ string.

    connection_type can currently be one of standard_bittorrent or web_seed. These are currently the only implemented protocols.

    -
    -

    session_settings

    +
    +

    session_settings

    You have some control over tracker requests through the session_settings object. You create it and fill it with your settings and then use session::set_settings() to apply them. You have control over proxy and authorization settings and also the user-agent @@ -1990,8 +1990,8 @@ abusive behavior by peers. It may be useful to allow such connections in cases where simulations are run on the same machie, and all peers in a swarm has the same IP address.

    -
    -

    ip_filter

    +
    +

    ip_filter

    The ip_filter class is a set of rules that uniquely categorizes all ip addresses as allowed or disallowed. The default constructor creates a single rule that allows all addresses (0.0.0.0 - 255.255.255.255 for @@ -2023,8 +2023,8 @@ public: };

    -
    -

    ip_filter()

    +
    +

    ip_filter()

     ip_filter()
    @@ -2034,8 +2034,8 @@ ip_filter()
     

    postcondition: access(x) == 0 for every x

    -
    -

    add_rule()

    +
    +

    add_rule()

     void add_rule(address first, address last, int flags);
    @@ -2052,8 +2052,8 @@ means disallowed.

    This means that in a case of overlapping ranges, the last one applied takes precedence.

    -
    -

    access()

    +
    +

    access()

     int access(address const& addr) const;
    @@ -2064,8 +2064,8 @@ can currently be 0 or ip_filter::
     is O(log n), where n is the minimum number of non-overlapping ranges to describe
     the current filter.

    -
    -

    export_filter()

    +
    +

    export_filter()

     boost::tuple<std::vector<ip_range<address_v4> >
    @@ -2080,8 +2080,8 @@ entry in the returned vector is a range with the access control specified in its
     and one for IPv6 addresses.

    -
    -

    big_number

    +
    +

    big_number

    Both the peer_id and sha1_hash types are typedefs of the class big_number. It represents 20 bytes of data. Its synopsis follows:

    @@ -2101,8 +2101,8 @@ public:
     

    The iterators gives you access to individual bytes.

    -
    -

    hasher

    +
    +

    hasher

    This class creates sha1-hashes. Its declaration looks like this:

     class hasher
    @@ -2128,8 +2128,8 @@ call reset() to reini
     

    The sha1-algorithm used was implemented by Steve Reid and released as public domain. For more info, see src/sha1.cpp.

    -
    -

    fingerprint

    +
    +

    fingerprint

    The fingerprint class represents information about a client and its version. It is used to encode this information into the client's peer id.

    This is the class declaration:

    @@ -2191,10 +2191,10 @@ sure not to clash with anybody else. Here are some taken id's:

    version of your client. All these numbers must be within the range [0, 9].

    to_string() will generate the actual string put in the peer-id, and return it.

    -
    -

    free functions

    -
    -

    identify_client()

    +
    +

    free functions

    +
    +

    identify_client()

     std::string identify_client(peer_id const& id);
    @@ -2204,8 +2204,8 @@ std::string identify_client(peer_id const& id);
     to extract a string describing a client version from its peer-id. It will recognize most clients
     that have this kind of identification in the peer-id.

    -
    -

    client_fingerprint()

    +
    +

    client_fingerprint()

     boost::optional<fingerprint> client_fingerprint(peer_id const& p);
    @@ -2216,8 +2216,8 @@ to automate the identification of clients. It will not be able to identify peers
     standard encodings. Only Azureus style, Shadow's style and Mainline style. This function is
     declared in the header <libtorrent/identify_client.hpp>.

    -
    -

    bdecode() bencode()

    +
    +

    bdecode() bencode()

     template<class InIt> entry bdecode(InIt start, InIt end);
    @@ -2257,8 +2257,8 @@ entry e = bdecode(buf, buf + data_size);
     it will throw invalid_encoding.

    -
    -

    alerts

    +
    +

    alerts

    The pop_alert() function on session is the interface for retrieving alerts, warnings, messages and errors from libtorrent. If there hasn't occurred any errors (matching your severity level) pop_alert() will @@ -2339,8 +2339,8 @@ public: have a severity level that can be used to sort them or present them to the user in different ways.

    The specific alerts, that all derives from alert, are:

    -
    -

    listen_failed_alert

    +
    +

    listen_failed_alert

    This alert is generated when none of the ports, given in the port range, to session can be opened for listening. This alert is generated as severity level fatal.

    @@ -2352,8 +2352,8 @@ struct listen_failed_alert: alert };
    -
    -

    file_error_alert

    +
    +

    file_error_alert

    If the storage fails to read or write files that it needs access to, this alert is generated and the torrent is paused. It is generated as severity level fatal.

    @@ -2362,14 +2362,14 @@ struct file_error_alert: alert
             file_error_alert(
                     const torrent_handle& h
                     , const std::string& msg);
    -                
    +
             virtual std::auto_ptr<alert> clone() const;
             torrent_handle handle;
     };
     
    -
    -

    tracker_announce_alert

    +
    +

    tracker_announce_alert

    This alert is generated each time a tracker announce is sent (or attempted to be sent). It is generated at severity level info.

    @@ -2378,14 +2378,14 @@ struct tracker_announce_alert: alert
             tracker_announce_alert(
                     const torrent_handle& h
                     , const std::string& msg);
    -                
    +
             virtual std::auto_ptr<alert> clone() const;
             torrent_handle handle;
     };
     
    -
    -

    tracker_alert

    +
    +

    tracker_alert

    This alert is generated on tracker time outs, premature disconnects, invalid response or a HTTP response other than "200 OK". From the alert you can get the handle to the torrent the tracker belongs to. This alert is generated as severity level warning.

    @@ -2406,8 +2406,8 @@ struct tracker_alert: alert };
    -
    -

    tracker_reply_alert

    +
    +

    tracker_reply_alert

    This alert is only for informational purpose. It is generated when a tracker announce succeeds. It is generated with severity level info.

    @@ -2421,8 +2421,8 @@ struct tracker_reply_alert: alert
     };
     
    -
    -

    tracker_warning_alert

    +
    +

    tracker_warning_alert

    This alert is triggered if the tracker reply contains a warning field. Usually this means that the tracker announce was successful, but the tracker has a message to the client. The message string in the alert will contain the warning message from @@ -2438,8 +2438,8 @@ struct tracker_warning_alert: alert };

    -
    -

    url_seed_alert

    +
    +

    url_seed_alert

    This alert is generated when a HTTP seed name lookup fails. This alert is generated as severity level warning.

    It contains url to the HTTP seed that failed along with an error message.

    @@ -2453,8 +2453,8 @@ struct url_seed_alert: alert };
    -
    -

    hash_failed_alert

    +
    +

    hash_failed_alert

    This alert is generated when a finished piece fails its hash check. You can get the handle to the torrent which got the failed piece and the index of the piece itself from the alert. This alert is generated as severity level info.

    @@ -2472,8 +2472,8 @@ struct hash_failed_alert: alert };
    -
    -

    peer_ban_alert

    +
    +

    peer_ban_alert

    This alert is generated when a peer is banned because it has sent too many corrupt pieces to us. It is generated at severity level info. The handle member is a torrent_handle to the torrent that this peer was a member of.

    @@ -2491,8 +2491,8 @@ struct peer_ban_alert: alert };
    -
    -

    peer_error_alert

    +
    +

    peer_error_alert

    This alert is generated when a peer sends invalid data over the peer-peer protocol. The peer will be disconnected, but you get its ip address from the alert, to identify it. This alert is generated as severity level debug.

    @@ -2510,8 +2510,8 @@ struct peer_error_alert: alert };
    -
    -

    invalid_request_alert

    +
    +

    invalid_request_alert

    This is a debug alert that is generated by an incoming invalid piece request. The handle is a handle to the torrent the peer is a member of. Ïp is the address of the peer and the request is the actual incoming request from the peer. The alert is generated as severity level @@ -2546,8 +2546,8 @@ struct peer_request the index of the piece it want data from, start is the offset within the piece where the data should be read, and length is the amount of data it wants.

    -
    -

    torrent_finished_alert

    +
    +

    torrent_finished_alert

    This alert is generated when a torrent switches from being a downloader to a seed. It will only be generated once per torrent. It contains a torrent_handle to the torrent in question. This alert is generated as severity level info.

    @@ -2563,8 +2563,8 @@ struct torrent_finished_alert: alert };
    -
    -

    metadata_failed_alert

    +
    +

    metadata_failed_alert

    This alert is generated when the metadata has been completely received and the info-hash failed to match it. i.e. the metadata that was received was corrupt. libtorrent will automatically retry to fetch it in this case. This is only relevant when running a @@ -2576,14 +2576,14 @@ struct metadata_failed_alert: alert metadata_failed_alert( const torrent_handle& h , const std::string& msg); - + virtual std::auto_ptr<alert> clone() const; torrent_handle handle; };

    -
    -

    metadata_received_alert

    +
    +

    metadata_received_alert

    This alert is generated when the metadata has been completely received and the torrent can start downloading. It is not generated on torrents that are started with metadata, but only those that needs to download it from peers (when utilizing the libtorrent extension). @@ -2594,14 +2594,14 @@ struct metadata_received_alert: alert metadata_received_alert( const torrent_handle& h , const std::string& msg); - + virtual std::auto_ptr<alert> clone() const; torrent_handle handle; };

    -
    -

    fastresume_rejected_alert

    +
    +

    fastresume_rejected_alert

    This alert is generated when a fastresume file has been passed to add_torrent but the files on disk did not match the fastresume file. The string explains the reason why the resume file was rejected. It is generated at severity level warning.

    @@ -2639,17 +2639,17 @@ of the sending peer. address ip; }; -->
    -
    -

    dispatcher

    +
    +

    dispatcher

    TODO: describe the dispatcher mechanism

    -
    -

    exceptions

    +
    +

    exceptions

    There are a number of exceptions that can be thrown from different places in libtorrent, here's a complete list with description.

    -
    -

    invalid_handle

    +
    +

    invalid_handle

    This exception is thrown when querying information from a torrent_handle that hasn't been initialized or that has become invalid.

    @@ -2659,8 +2659,8 @@ struct invalid_handle: std::exception
     };
     
    -
    -

    duplicate_torrent

    +
    +

    duplicate_torrent

    This is thrown by add_torrent() if the torrent already has been added to the session.

    @@ -2670,8 +2670,8 @@ struct duplicate_torrent: std::exception
     };
     
    -
    -

    invalid_encoding

    +
    +

    invalid_encoding

    This is thrown by bdecode() if the input data is not a valid bencoding.

     struct invalid_encoding: std::exception
    @@ -2680,8 +2680,8 @@ struct invalid_encoding: std::exception
     };
     
    -
    -

    type_error

    +
    +

    type_error

    This is thrown from the accessors of entry if the data type of the entry doesn't match the type you want to extract from it.

    @@ -2691,8 +2691,8 @@ struct type_error: std::runtime_error
     };
     
    -
    -

    invalid_torrent_file

    +
    +

    invalid_torrent_file

    This exception is thrown from the constructor of torrent_info if the given bencoded information doesn't meet the requirements on what information has to be present in a torrent file.

    @@ -2703,8 +2703,8 @@ struct invalid_torrent_file: std::exception
     
    -
    -

    fast resume

    +
    +

    fast resume

    The fast resume mechanism is a way to remember which pieces are downloaded and where they are put between sessions. You can generate fast resume data by calling torrent_handle::write_resume_data() on torrent_handle. You can @@ -2717,8 +2717,8 @@ start from scratch on the partially downloaded pieces.

    will skip the time consuming checks. It may have to do the checking anyway, if the fast-resume data is corrupt or doesn't fit the storage for that torrent, then it will not trust the fast-resume data and just do the checking.

    -
    -

    file format

    +
    +

    file format

    The file format is a bencoded dictionary containing the following fields:

    @@ -2816,8 +2816,8 @@ re-check is issued.
    -
    -

    threads

    +
    +

    threads

    libtorrent starts 2 or 3 threads.

      @@ -2835,8 +2835,8 @@ non-blocking host name resolution to simulate non-blocking behavior.
    -
    -

    storage allocation

    +
    +

    storage allocation

    There are two modes in which storage (files on disk) are allocated in libtorrent.

      @@ -2849,8 +2849,8 @@ pieces that have been downloaded. This is the default allocation mode in libtorr

      The allocation mode is selected when a torrent is started. It is passed as a boolean argument to session::add_torrent() (see add_torrent()). These two modes have different drawbacks and benefits.

      -
      -

      full allocation

      +
      +

      full allocation

      When a torrent is started in full allocation mode, the checker thread (see threads) will make sure that the entire storage is allocated, and fill any gaps with zeros. It will of course still check for existing pieces and fast resume data. The main @@ -2874,8 +2874,8 @@ filesystems' file allocation, and reduce fragmentation.

    -
    -

    compact allocation

    +
    +

    compact allocation

    The compact allocation will only allocate as much storage as it needs to keep the pieces downloaded so far. This means that pieces will be moved around to be placed at their final position in the files while downloading (to make sure the completed @@ -2921,8 +2921,8 @@ contain any piece), return that slot index.

    -
    -

    extensions

    +
    +

    extensions

    These extensions all operates within the extension protocol. The name of the extension is the name used in the extension-list packets, and the payload is the data in the extended message (not counting the @@ -2931,8 +2931,8 @@ length-prefix, message-id nor extension-id).

    handshake, it may be incompatible with future versions of the mainline bittorrent client.

    These are the extensions that are currently implemented.

    -
    -

    chat messages

    +
    +

    chat messages

    Extension name: "chat"

    The payload in the packet is a bencoded dictionary with any combination of the following entries:

    @@ -2957,8 +2957,8 @@ Any unrecognized strings should be ignored.
    -
    -

    metadata from peers

    +
    +

    metadata from peers

    Extension name: "metadata"

    The point with this extension is that you don't have to distribute the metadata (.torrent-file) separately. The metadata can be distributed @@ -3076,8 +3076,8 @@ doesn't have any metadata.

    -
    -

    HTTP seeding

    +
    +

    HTTP seeding

    The HTTP seed extension implements this specification.

    The libtorrent implementation assumes that, if the URL ends with a slash ('/'), the filename should be appended to it in order to request pieces from @@ -3087,8 +3087,8 @@ torrent's name '/' the file name is appended. This is the same directory structure that libtorrent will download torrents into.

    -
    -

    filename checks

    +
    +

    filename checks

    Boost.Filesystem will by default check all its paths to make sure they conform to filename requirements on many platforms. If you don't want this check, you can set it to either only check for native filesystem requirements or turn it off @@ -3098,8 +3098,8 @@ boost::filesystem::path::default_name_check(boost::filesystem::native);

    for example. For more information, see the Boost.Filesystem docs.

    -
    -

    acknowledgments

    +
    +

    acknowledgments

    Written by Arvid Norberg. Copyright © 2003-2006

    Contributions by Magnus Jonsson, Daniel Wallin and Cory Nelson

    Lots of testing, suggestions and contributions by Massaroddel and Tianhao Qiu.

    diff --git a/docs/projects.html b/docs/projects.html index 19c003f1c..547d59b8d 100644 --- a/docs/projects.html +++ b/docs/projects.html @@ -3,13 +3,14 @@ - + projects using libtorrent

    projects using libtorrent

    +

    These are some of the public projects that uses libtorrent. If you want your project listed here, let me know.

    @@ -24,7 +25,7 @@ which collectively generates animations and lets the users vote which one to live on.

    - - - - - - - - - - - - - - - - + +
    electric_sheep_thumb.jpg
    +
    electric_sheep_thumb.jpg

    qBittorrent

    @@ -33,7 +34,7 @@ client available for linux (likely portable to most other desktops as well). Written by Christophe Dumez.

    qbittorrent_thumb.jpg
    +
    qbittorrent_thumb.jpg

    btg

    @@ -47,26 +48,26 @@ connects to the daemon. One GUI Written by Michael Wojciechowski and Johan Ström.

    btg_thumb.jpg
    +
    btg_thumb.jpg

    BitRocket

    BitRocket is a MacOS X bittorrent client.

    bitrocket_thumb.png
    +
    bitrocket_thumb.png

    Instant Media

    IM is a client for downloading Internet TV.

    im_thumb.jpg
    +
    im_thumb.jpg

    MooPolice

    MooPolice is a windows bittorrent client with a quite unique look.

    moopolice_thumb.gif
    +
    moopolice_thumb.gif

    BitsCast

    @@ -75,13 +76,13 @@ video feed downloader, bittorrent feed downloader. See BitsCast homepage for more info.

    bitscast_thumb.png
    +
    bitscast_thumb.png

    BitSlug

    BitSlug is a MacOSX cocoa client.

    bitslug_thumb.png
    +
    bitslug_thumb.png

    BitBuddy

    @@ -89,7 +90,7 @@ homepage for more info.

    client by Daniel Wang, quite similar to BitComet GUI-wise.

    bitbuddy_thumb.jpg
    +
    bitbuddy_thumb.jpg

    Arctic Torrent

    @@ -97,15 +98,15 @@ similar to BitComet GUI-wise.

    bittorrent client for windows. Written by Cory Nelson.

    arctic_thumb.png
    +
    arctic_thumb.png

    deluge torrent

    -

    deluge Torrent is a more full-featured yet still lightweight bittorrent +

    deluge Torrent is a more full-featured yet still lightweight bittorrent client. It has the ability to automatically resume partial downloads and background to the system tray.

    gtorrent_thumb.jpg
    +
    gtorrent_thumb.jpg

    ZipTorrent

    @@ -113,7 +114,7 @@ background to the system tray.

    bittorrent client with decentralized search facility.

    ziptorrent_thumb.gif
    +
    ziptorrent_thumb.gif

    Jamplayer

    diff --git a/docs/projects.rst b/docs/projects.rst index 5a9f188ba..b3147dfe6 100644 --- a/docs/projects.rst +++ b/docs/projects.rst @@ -114,7 +114,7 @@ project listed here, let me_ know. .. _BitSlug: http://bitslug.sourceforge.net/ .. _BitBuddy: http://www.btvampire.com .. _`Arctic Torrent`: http://www.int64.org/arctic.html -.. _`deluge Torrent`: http://code.google.com/p/deluge-torrent/ +.. _`deluge Torrent`: http://deluge-torrent.org/ .. _ZipTorrent: http://www.ziptorrent.com/ .. _FireANT: http://antisnottv.net/ .. _eDonkey2000: http://www.edonkey2000.com/ diff --git a/docs/ubuntu_build_notes.html b/docs/ubuntu_build_notes.html index bf9ff679e..032486588 100644 --- a/docs/ubuntu_build_notes.html +++ b/docs/ubuntu_build_notes.html @@ -3,11 +3,10 @@ - + Building libtorrent on Ubuntu 6.06 - - + @@ -19,16 +18,15 @@
    Date: Nov 6, 2006
    Author:Xi Stan
    Author:Francois Dermu
    Authors:Xi Stan +
    Francois Dermu
    Contact: stan8688@gmail.com
    -
    -

    Prerequisites

    +
    +

    Prerequisites

    To build libtorrent, you need the following libraries:

    -
    -

    Step 1: Acquire the source code from cvs

    +
    +

    Step 1: Acquire the source code from cvs

    Create a directory for the project:

     mkdir ${HOME}/work
    @@ -60,8 +58,8 @@ cvs -z3 -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio co -P as
     cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login
     
    -
    -

    Step 2: Building boost

    +
    +

    Step 2: Building boost

    To build boost, first build boost-build and then use that to build the libraries themselves:

    @@ -87,18 +85,18 @@ libboost_date_time-gcc-1_31.a
     libboost_date_time-gcc-mt-1_31.a
     
    -
    -

    Step 3: Copy asio into the libtorrent directory

    +
    +

    Step 3: Copy asio into the libtorrent directory

    Skip this step if you're using a released tarball.

    Execute the following command:

     cp -R ${BASE_DIR}/asio/include/asio* ${BASE_DIR}/libtorrent/include/libtorrent
     
    -
    -

    Step 4: Building libtorrent

    -
    -

    building with autotools

    +
    +

    Step 4: Building libtorrent

    +
    +

    building with autotools

    First of all, you need to install automake and autoconf. Many unix/linux systems comes with these preinstalled. The prerequisites for building libtorrent are boost.thread, boost.date_time and boost.filesystem. Those are the compiled boost @@ -108,8 +106,8 @@ boost.lexical_cast, boost.integer, boost.iterator, boost.tuple, boost.array, boost.function, boost.smart_ptr, boost.preprocessor, boost.static_assert.

    If you want to build the client_test example, you'll also need boost.regex and boost.program_options.

    -
    -

    generating the build system

    +
    +

    generating the build system

    No build system is present if libtorrent is checked out from CVS - it needs to be generated first. If you're building from a released tarball, you may skip directly to running configure.

    @@ -127,8 +125,8 @@ autoconf

    On darwin/OSX you have to run glibtoolize instead of libtoolize.

    -
    -

    running configure

    +
    +

    running configure

    To use the auto tools to build libtorrent, execute the following commands:

     cd ${BASE_DIR}/libtorrent
    diff --git a/docs/udp_tracker_protocol.html b/docs/udp_tracker_protocol.html
    index b01a8fa92..091d55354 100644
    --- a/docs/udp_tracker_protocol.html
    +++ b/docs/udp_tracker_protocol.html
    @@ -3,7 +3,7 @@
     
     
     
    -
    +
     Bittorrent udp-tracker protocol extension
     
     
    @@ -35,8 +35,8 @@
     
  • credits
  • -
    -

    introduction

    +
    +

    introduction

    A tracker with the protocol "udp://" in its URI is supposed to be contacted using this protocol.

    This protocol is supported by @@ -50,8 +50,8 @@ are specified with ANSI-C standard types.

    the request. If no reply has been received after 60 seconds, stop retrying.

    -
    -

    connecting

    +
    +

    connecting

    Client sends packet:

    @@ -120,8 +120,8 @@ anymore.
    -
    -

    announcing

    +
    +

    announcing

    Client sends packet:

    @@ -282,8 +282,8 @@ seeding.
    -
    -

    scraping

    +
    +

    scraping

    Client sends packet:

    @@ -401,8 +401,8 @@ leechers.
    -
    -

    errors

    +
    +

    errors

    In case of a tracker error,

    server replies packet:

    @@ -436,8 +436,8 @@ describing the error.
    -
    -

    actions

    +
    +

    actions

    The action fields has the following encoding:

      @@ -448,8 +448,8 @@ describing the error.
    -
    -

    extensions

    +
    +

    extensions

    The extensions field is a bitmask. The following bits are assigned:

    @@ -457,8 +457,8 @@ bits are assigned:

  • 1 = authentication.
  • -
    -

    authentication

    +
    +

    authentication

    The packet will have an authentication part appended to it. It has the following format:

    @@ -497,8 +497,8 @@ from the 20 bytes hash calculated.
    -
    -

    credits

    +
    +

    credits

    Protocol designed by Olaf van der Spek

    diff --git a/docs/vs2005_build_notes.html b/docs/vs2005_build_notes.html index a2f51aa52..e1f599327 100644 --- a/docs/vs2005_build_notes.html +++ b/docs/vs2005_build_notes.html @@ -3,7 +3,7 @@ - + libtorrent setup for VS.NET 2005 Development @@ -21,16 +21,16 @@ www.thomasgoddard.com -
    -

    Prerequisites

    +
    +

    Prerequisites

    1. Download boost from boost.org
    2. Download libtorrent
    3. Extract both to a folder called libtorrent
    -
    -

    Compiling boost for VS.NET 2005

    +
    +

    Compiling boost for VS.NET 2005

    1. Copy bjam.exe to libtorrent\boost_[version]\tools\build
    2. Add the path "libtorrent\boost_[version]\tools\build" to the windows path environment variable
    3. @@ -44,16 +44,16 @@
    4. Type: bjam "-sTOOLS=vc-8_0" install and hit enter
    5. Be patient and wait for it to finish
    -
    -

    Troubleshooting

    +
    +

    Troubleshooting

    • Make sure to CD to the root of the boost directory before running the install.
    • For additional details and information on using Visual Studio 2005 Express addition, see the Boost Getting Started Guide.
    -
    -

    Setting up and compiling libtorrent with VS.NET 2005

    +
    +

    Setting up and compiling libtorrent with VS.NET 2005

    1. Create a new vs.net 2005 MFC project and solution file in the root of the libtorrent folder where you extracted all of the libtorrent files.

    2. @@ -98,8 +98,8 @@ libboost_date_time-vc80-mt.lib
    3. Set the Runtime Library to Multi-threaded Debug DLL (/MDd) under the code generation section.

    -
    -

    Troubleshooting

    +
    +

    Troubleshooting

    Error: error LNK2005:already defined etc...
    Make sure you use the Multi-threaded Debug DLL (/MDd)
    diff --git a/include/libtorrent/session_status.hpp b/include/libtorrent/session_status.hpp index 7d12674fd..834044e36 100644 --- a/include/libtorrent/session_status.hpp +++ b/include/libtorrent/session_status.hpp @@ -56,9 +56,9 @@ namespace libtorrent int num_peers; #ifndef TORRENT_DISABLE_DHT - int m_dht_nodes; - int m_dht_node_cache; - int m_dht_torrents; + int dht_nodes; + int dht_node_cache; + int dht_torrents; #endif }; diff --git a/src/kademlia/dht_tracker.cpp b/src/kademlia/dht_tracker.cpp index c11ddb0e2..9d01a4940 100644 --- a/src/kademlia/dht_tracker.cpp +++ b/src/kademlia/dht_tracker.cpp @@ -204,8 +204,8 @@ namespace libtorrent { namespace dht void dht_tracker::dht_status(session_status& s) { - boost::tie(s.m_dht_nodes, s.m_dht_node_cache) = m_dht.size(); - s.m_dht_torrents = m_dht.data_size(); + boost::tie(s.dht_nodes, s.dht_node_cache) = m_dht.size(); + s.dht_torrents = m_dht.data_size(); } void dht_tracker::connection_timeout(asio::error_code const& e) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 65315a336..2026e4b37 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1496,9 +1496,9 @@ namespace libtorrent { namespace detail } else { - s.m_dht_nodes = 0; - s.m_dht_node_cache = 0; - s.m_dht_torrents = 0; + s.dht_nodes = 0; + s.dht_node_cache = 0; + s.dht_torrents = 0; } #endif @@ -1839,7 +1839,7 @@ namespace libtorrent { namespace detail const entry& ad = (*i)["adler32"]; // crc's didn't match, don't use the resume data - if (ad.integer() != adler) + if (ad.integer() != entry::integer_type(adler)) { error = "checksum mismatch on piece " + boost::lexical_cast(p.index); return; diff --git a/src/ut_pex.cpp b/src/ut_pex.cpp index 07d614a7c..adeadd820 100644 --- a/src/ut_pex.cpp +++ b/src/ut_pex.cpp @@ -80,8 +80,8 @@ namespace libtorrent { namespace m_1_minute = 0; std::list cs; - for (torrent::peer_iterator i = m_torrent.m_connections.begin() - , end(m_torrent.m_connections.end()); i != end; ++i) + for (torrent::peer_iterator i = m_torrent.begin() + , end(m_torrent.end()); i != end; ++i) { if (!i->second->is_local()) continue; cs.push_back(i->first);