diff --git a/docs/building.html b/docs/building.html index f430b09b1..1fc668aaf 100644 --- a/docs/building.html +++ b/docs/building.html @@ -367,14 +367,6 @@ the name of the feature, just the value.
boost.program-options symbols.For more information, see the Boost build v2 documentation, or more specifically the section on builtin features.
-To build all possible variants of libtorrent (good for testing when making -sure all build variants will actually compile), you can invoke this command:
--bjam debug release link=shared link=static logging=verbose logging=default \ -logging=none dht-support=on dht-support=logging dht-support=off pe-support=on \ -pe-support=off zlib=shipped zlib=system openssl=on openssl=off \ -character-set=ansi character-set=unicode -
If you're building in MS Visual Studio, you may have to set the compiler options "force conformance in for loop scope", "treat wchar_t as built-in type" and "Enable Run-Time Type Info" to Yes. For a detailed description -on how to build libtorrent with VS 2005, see this document.
+on how to build libtorrent with VS, see the wiki.std::auto_ptr<alert> pop_alert(); +alert const* wait_for_alert(time_duration max_wait); void set_severity_level(alert::severity_t s);
pop_alert() is used to ask the session if any errors or events has occurred. With 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.
+wait_for_alert blocks until an alert is available, or for no more than max_wait +time. If wait_for_alert returns because of the time-out, and no alerts are available, +it returns 0. If at least one alert was generated, a pointer to that alert is returned. +The alert is not popped, any subsequent calls to wait_for_alert will return the +same pointer until the alert is popped by calling pop_alert. This is useful for +leaving any alert dispatching mechanism independent of this blocking call, the dispatcher +can be called and it can pop the alert independently.
The default constructor of torrent_info is used when creating torrent files. It will @@ -1280,58 +1286,23 @@ etc.
exception that it will initialize the info-hash to the given value. This is used internally when downloading torrents without the metadata. The metadata will be created by libtorrent as soon as it has been downloaded from the swarm. -The last constructor is the one that is used in most cases. It will create a torrent_info -object from the information found in the given torrent_file. The entry represents a tree -node in an bencoded file. To load an ordinary .torrent file into an entry, use bdecode(), -see bdecode() bencode().
+The constructor that takes an entry, is the one that is used in most cases. It will create +a torrent_info object from the information found in the given torrent_file. The +entry represents a tree node in an bencoded file. To load an ordinary .torrent file +into an entry, use bdecode(), see bdecode() bencode().
+The version that takes a filename will simply load the torrent file and decode it inside +the constructor, for convenience. This might not be the most suitable for applications that +want to be able to report detailed errors on what might go wrong.
--void set_comment(char const* str); -void set_piece_size(int size); -void set_creator(char const* str); -void set_hash(int index, sha1_hash const& h); void add_tracker(std::string const& url, int tier = 0); -void add_file(boost::filesystem::path file, size_type size);
These files are used when creating a torrent file. set_comment() will simply set -the comment that belongs to this torrent. The comment can be retrieved with the -comment() member. The string should be UTF-8 encoded.
-set_piece_size() will set the size of each piece in this torrent. The piece size must -be an even multiple of 2. i.e. usually something like 256 kiB, 512 kiB, 1024 kiB etc. The -size is given in number of bytes.
-set_creator() is an optional attribute that can be used to identify your application -that was used to create the torrent file. The string should be UTF-8 encoded.
-set_hash() writes the hash for the piece with the given piece-index. You have to call -this function for every piece in the torrent. Usually the hasher is used to calculate -the sha1-hash for a piece.
add_tracker() adds a tracker to the announce-list. The tier determines the order in which the trackers are to be tried. For more information see trackers().
-add_file() adds a file to the torrent. The order in which you add files will determine -the order in which they are placed in the torrent file. You have to add at least one file -to the torrent. The path you give has to be a relative path from the root directory -of the torrent. The size is given in bytes.
-When you have added all the files and hashes to your torrent, you can generate an entry -which then can be encoded as a .torrent file. You do this by calling create_torrent().
-For a complete example of how to create a torrent from a file structure, see make_torrent.
----entry create_torrent(); --
Returns an entry representing the bencoded tree of data that makes up a .torrent file. -You can save this data as a torrent file with bencode() (see bdecode() bencode()), for a -complete example, see make_torrent.
-This function is not const because it will also set the info-hash of the torrent_info -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.
See HTTP seeding for more information.
---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. This function has been deprecated and will -be removed from future releases.
-@@ -1544,18 +1504,21 @@ 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.
size_type piece_size(unsigned int index) const; sha1_hash const& hash_for_piece(unsigned int index) const; +char const* hash_for_piece_ptr(unsigned int index) const;
hash_for_piece() takes a piece-index and returns the 20-bytes sha1-hash for that piece and info_hash() returns the 20-bytes sha1-hash for the info-section of the torrent file. For more information on the sha1_hash, see the big_number class. -info_hash() will only return a valid hash if the torrent_info was read from a +hash_for_piece_ptr() returns a pointer to the 20 byte sha1 digest for the piece. +Note that the string is not null-terminated.
+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).
creator() returns the creator string in the torrent. If there is no creator string it will return an empty string.
bool priv() const; -void set_priv(bool v);
priv() returns true if this torrent is private. i.e., it should not be distributed on the trackerless network (the kademlia DHT).
-set_priv() sets or clears the private flag on this torrent.
This is used when creating torrent. Use this to add a known DHT node. It may be used, by the client, to bootstrap into the DHT network.
+++boost::shared_array<char> metadata() const; +int metadata_size() const; ++
metadata() returns a the raw info section of the torrent file. The size +of the metadata is returned by metadata_size().
+progress is a value in the range [0, 1], that represents the progress of the @@ -2446,10 +2418,9 @@ number of seconds this torrent has been active (not paused) and the number of seconds it has been active while being a seed. seeding_time should be >= active_time They are saved in and restored from resume data, to keep totals across sessions.
-seed_cycles is the number of times this torrent has reached the seed limits. -It will keep being seeded, but it will rotate between torrents that haven't -completed as many cycles. The fraction part of this number is the progress -of the current cycle. For more information, see queuing.
+seed_rank is a rank of how important it is to seed the torrent, it is used +to determine which torrents to seed and which to queue. It is based on the peer +to seed ratio from the tracker scrape. For more information, see queuing.
user_agent this is the client identification to the tracker. @@ -2996,12 +2968,16 @@ counted against the seed limit.
auto_manage_interval is the number of seconds between the torrent queue is updated, and rotated.
share_ratio_limit is the upload / download ratio limit for considering a -seeding torrent have completed one seed cycle. See queuing.
+seeding torrent have met the seed limit criteria. See queuing.seed_time_ratio_limit is the seeding time / downloading time ratio limit -for considering a seeding torrent to have completed one seed cycle. See queuing.
+for considering a seeding torrent to have met the seed limit criteria. See queuing.seed_time_limit is the limit on the time a torrent has been an active seed -(specified in seconds) before it is considered having completed one seed cycle. +(specified in seconds) before it is considered having met the seed limit criteria. See queuing.
+close_redundant_connections specifies whether libtorrent should close +connections where both ends have no utility in keeping the connection open. +For instance if both ends have completed their downloads, there's no point +in keeping it open. This defaults to true.