diff --git a/docs/manual.html b/docs/manual.html index caed04a26..61c9aead7 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -22,153 +22,153 @@
Table of contents
+The interface of libtorrent consists of a few classes. The main class is the session, it contains the main loop that serves all torrents.
The basic usage is as follows:
@@ -194,8 +194,8 @@ the session, it contaEach class and function is described in this manual.
There are a few typedefs in the libtorrent namespace which pulls in network types from the asio namespace. These are:
@@ -214,8 +214,8 @@ udp::endpointWhich are the endpoint types used in libtorrent. An endpoint is an address with an associated port.
The session class has the following synopsis:
class session: public boost::noncopyable @@ -295,8 +295,8 @@ class session: public boost::noncopyable
Once it's created, the session object will spawn the main thread that will do all the work. The main thread will be idle as long it doesn't have any torrents to participate in.
-
session(fingerprint const& print
@@ -315,16 +315,16 @@ The other constructor, that takes a port range and an interface as well as the f
will automatically try to listen on a port on the given interface. For more information about
the parameters, see listen_on() function.
The destructor of session will notify all trackers that our torrents have been shut down. If some trackers are down, they will time out. All this before the destructor of session returns. So, it's advised that any kind of interface (such as windows) are closed before destructing the session object. Because it can take a few second for it to finish. The timeout can be set with set_settings().
session_proxy abort();@@ -346,8 +346,8 @@ public: };
torrent_handle add_torrent( @@ -397,8 +397,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.
void remove_torrent(torrent_handle const& h); @@ -415,8 +415,8 @@ In case the torrent cannot be found, an invalid torrent_handle is returned.get_torrents() returns a vector of torrent_handles to all the torrents currently in the session.
void set_upload_rate_limit(int bytes_per_second); @@ -433,8 +433,8 @@ of upload rate. download_rate_limit() and upload_rate_limit() returns the previously set limits.
void set_max_uploads(int limit); @@ -447,8 +447,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.
int num_uploads() const; @@ -458,8 +458,8 @@ int num_connections() const;Returns the number of currently unchoked peers and the number of connections (including half-open ones) respectively.
void set_max_half_open_connections(int limit); @@ -475,8 +475,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.
void set_ip_filter(ip_filter const& filter); @@ -487,8 +487,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.
session_status status() const; @@ -539,8 +539,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.
bool is_listening() const; @@ -583,8 +583,8 @@ with a DHT ping packet, and connect to those that responds first. On windows one can only connect to a few peers at a time because of a built in limitation (in XP Service pack 2).
std::auto_ptr<alert> pop_alert(); @@ -595,8 +595,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.
void add_extension(boost::function< @@ -625,8 +625,8 @@ ses.add_extension(&libtorrent::create_metadata_plugin); ses.add_extension(&libtorrent::create_ut_pex_plugin);
void start_dht(entry const& startup_state); @@ -686,8 +686,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.
void add_dht_node(std::pair<std::string, int> const& node);
@@ -706,8 +706,8 @@ for bootstrapping, to keep the load off them.
router.bittorrent.com.
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:
@@ -770,8 +770,8 @@ public: };TODO: finish documentation of entry.
-integer_type& integer(); @@ -823,8 +823,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.
entry& operator[](char const* key);
@@ -842,8 +842,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.
entry* find_key(char const* key); @@ -857,8 +857,8 @@ element cannot be found, they will return 0. If an element with the given key is found, the return a pointer to it.
The torrent_info has the following synopsis:
class torrent_info @@ -922,8 +922,8 @@ public: sha1_hash const& hash_for_piece(unsigned int index) const; };-
torrent_info(); @@ -946,8 +946,8 @@ object from the information found in the given torrent_file. The entry, use bdecode(), see bdecode() bencode().
void set_comment(char const* str); @@ -979,8 +979,8 @@ of the torrent. The size 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(); @@ -994,8 +994,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.
file_iterator begin_files() const; @@ -1030,8 +1030,8 @@ struct file_entry };
int num_files() const; @@ -1041,8 +1041,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.
std::vector<file_slice> map_block(int piece, size_type offset @@ -1067,8 +1067,8 @@ as argument. The offsetsize is the number of bytes this range is. The size + offset will never be greater than the file size.
peer_request map_file(int file_index, size_type file_offset @@ -1095,8 +1095,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().
std::vector<std::string> const& url_seeds() const; @@ -1109,8 +1109,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.
void print(std::ostream& os) const; @@ -1119,8 +1119,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.
std::vector<announce_entry> const& trackers() const; @@ -1139,8 +1139,8 @@ struct announce_entry };
size_type total_size() const;
@@ -1157,8 +1157,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.
size_type piece_size(unsigned int index) const; @@ -1171,8 +1171,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).
std::string const& name() const; @@ -1182,15 +1182,15 @@ boost::optional<boost::posix_time::ptime> creation_date() const;
name() returns the name of the torrent.
comment() returns the comment associated with the torrent. If there's no comment, -it will return an empty string. creation_date() returns a boost::posix_time::ptime +it will return an empty string. creation_date() returns a boost::posix_time::ptime object, representing the time when this torrent file was created. If there's no time stamp in the torrent file, this will return a date of January 1:st 1970.
Both the name and the comment is UTF-8 encoded strings.
creator() returns the creator string in the torrent. If there is no creator string it will return an empty string.
bool priv() const; @@ -1201,8 +1201,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.
std::vector<std::pair<std::string, int> > const& nodes() const; @@ -1211,8 +1211,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).
void add_node(std::pair<std::string, int> const& node); @@ -1222,8 +1222,8 @@ void add_node(std::pair<std::string, int> const& node); be used, by the client, to bootstrap into the DHT network.
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:
@@ -1312,8 +1312,8 @@ two exceptions, info_hash()void piece_priority(int index, int priority) const; @@ -1355,8 +1355,8 @@ torrent. Each element is the current priority of that piece. files in the torrent. Each entry is the priority of that file. The function sets the priorities of all the pieces in the torrent based on the vector.
void file_progress(std::vector<float>& fp); @@ -1367,8 +1367,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.
boost::filesystem::path save_path() const; @@ -1377,8 +1377,8 @@ boost::filesystem::path save_path() const;save_path() returns the path that was given to add_torrent() when this torrent was started.
bool move_storage(boost::filesystem::path const& save_path) const; @@ -1390,8 +1390,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.
void force_reannounce() const; @@ -1401,8 +1401,8 @@ void force_reannounce() const; peers. If the torrent is invalid, queued or in checking mode, this functions will throw invalid_handle.
void connect_peer(asio::ip::tcp::endpoint const& adr) const; @@ -1414,8 +1414,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.
std::string name() const;
@@ -1425,8 +1425,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.
void set_ratio(float ratio) const; @@ -1440,8 +1440,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.
void set_upload_limit(int limit) const; @@ -1455,8 +1455,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); @@ -1473,8 +1473,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; @@ -1484,8 +1484,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; @@ -1499,8 +1499,8 @@ all potential (not connected) peers. You can usefile_error_alert.-resolve_countries()
++-resolve_countries()
void resolve_countries(bool r); @@ -1512,8 +1512,8 @@ torrent. It defaults to false. If it is set to true, the country member set. See peer_info for more information on how to interpret this field.-is_seed()
++-is_seed()
bool is_seed() const; @@ -1521,8 +1521,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; @@ -1533,8 +1533,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 @@ -1544,8 +1544,8 @@ void set_tracker_login(std::string const& usernameset_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; @@ -1561,8 +1561,8 @@ a list of the same form as the one returned fromforce_reannounce().-add_url_seed()
++-add_url_seed()
void add_url_seed(std::string const& url); @@ -1574,8 +1574,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; @@ -1586,8 +1586,8 @@ connections. By default, it uses the same interface as the-info_hash()
++-info_hash()
sha1_hash info_hash() const; @@ -1595,8 +1595,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; @@ -1610,8 +1610,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; @@ -1633,8 +1633,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; @@ -1644,8 +1644,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; @@ -1681,8 +1681,8 @@ or not. And the num_downloads
-get_peer_info()
++-get_peer_info()
void get_peer_info(std::vector<peer_info>&) const; @@ -1693,8 +1693,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; @@ -1707,8 +1707,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; @@ -1723,8 +1723,8 @@ that refers to that torrent will become invalid.TODO: document storage
-torrent_status
++-torrent_status
It contains the following fields:
struct torrent_status @@ -1896,8 +1896,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 @@ -2049,8 +2049,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 @@ -2158,8 +2158,8 @@ swarm has the same IP address.
all trackers in its tracker list has failed. Either by an explicit error message or a time out.-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 @@ -2191,8 +2191,8 @@ public: }; -
-ip_filter()
++-ip_filter()
ip_filter() @@ -2202,8 +2202,8 @@ ip_filter()postcondition: access(x) == 0 for every x
-add_rule()
++-add_rule()
void add_rule(address first, address last, int flags); @@ -2220,8 +2220,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; @@ -2232,8 +2232,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> > @@ -2248,8 +2248,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:
@@ -2269,8 +2269,8 @@ public:The iterators gives you access to individual bytes.
-hasher
++-hasher
This class creates sha1-hashes. Its declaration looks like this:
class hasher @@ -2296,8 +2296,8 @@ call reset() to reiniThe 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:
@@ -2359,10 +2359,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); @@ -2372,8 +2372,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); @@ -2384,8 +2384,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); @@ -2425,8 +2425,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 @@ -2517,8 +2517,8 @@ struct torrent_alert: alert };
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.
@@ -2530,8 +2530,8 @@ struct listen_failed_alert: alert };-portmap_error_alert
++-portmap_error_alert
This alert is generated when a NAT router was successfully found but some part of the port mapping request failed. It contains a text message that may help the user figure out what is wrong. This alert is not generated in @@ -2548,8 +2548,8 @@ struct portmap_error_alert: alert };
-portmap_alert
++-portmap_alert
This alert is generated when a NAT router was successfully found and a port was successfully mapped on it. On a NAT:ed network with a NAT-PMP capable router, this is typically generated once when mapping the TCP @@ -2563,8 +2563,8 @@ struct portmap_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.
@@ -2578,8 +2578,8 @@ struct file_error_alert: torrent_alert };-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.
@@ -2593,8 +2593,8 @@ struct tracker_announce_alert: torrent_alert };-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.
@@ -2614,8 +2614,8 @@ struct tracker_alert: torrent_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 regardless what kind of tracker was used, be it UDP, HTTP or the DHT. It is generated with severity level info.
@@ -2634,8 +2634,8 @@ struct tracker_reply_alert: torrent_alertThe num_peers tells how many peers were returned from the tracker. This is not necessarily all new peers, some of them may already be connected.
-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 @@ -2650,8 +2650,8 @@ struct tracker_warning_alert: torrent_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.
@@ -2666,8 +2666,8 @@ struct url_seed_alert: torrent_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.
@@ -2685,8 +2685,8 @@ struct hash_failed_alert: torrent_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.
@@ -2704,8 +2704,8 @@ struct peer_ban_alert: torrent_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.
@@ -2723,8 +2723,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 @@ -2759,8 +2759,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.
@@ -2775,8 +2775,8 @@ struct torrent_finished_alert: torrent_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 @@ -2793,8 +2793,8 @@ struct metadata_failed_alert: torrent_alert };
-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). @@ -2810,8 +2810,8 @@ struct metadata_received_alert: torrent_alert };
-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.
@@ -2825,17 +2825,17 @@ struct fastresume_rejected_alert: torrent_alert };--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.
@@ -2845,8 +2845,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.
@@ -2856,8 +2856,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 @@ -2866,8 +2866,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.
@@ -2877,8 +2877,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.
@@ -2889,8 +2889,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 @@ -2903,8 +2903,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:
@@ -3002,8 +3002,8 @@ re-check is issued. -threads
++-threads
libtorrent starts 2 or 3 threads.
@@ -3021,8 +3021,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.
@@ -3035,8 +3035,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 @@ -3060,8 +3060,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 @@ -3107,8 +3107,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 @@ -3117,8 +3117,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.
--metadata from peers
++-metadata from peers
Extension name: "LT_metadata"
The point with this extension is that you don't have to distribute the metadata (.torrent-file) separately. The metadata can be distributed @@ -3236,8 +3236,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 @@ -3247,8 +3247,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 @@ -3258,8 +3258,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/manual.rst b/docs/manual.rst index c1e8f6063..52abd8178 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -1126,7 +1126,7 @@ Both the name and the comment is UTF-8 encoded strings. ``creator()`` returns the creator string in the torrent. If there is no creator string it will return an empty string. -__ http://www.boost.org/libs/date_time/doc/class_ptime.html +__ http://www.boost.org/doc/html/date_time/posix_time.html#date_time.posix_time.ptime_class priv() set_priv()