diff --git a/docs/building.html b/docs/building.html index 0d75b9ab5..645dc2dc1 100644 --- a/docs/building.html +++ b/docs/building.html @@ -452,6 +452,29 @@ upload and download rate. +
The variant feature is implicit, which means you don't need to specify @@ -720,6 +743,17 @@ or for running before releases.
If you experience that libtorrent uses unreasonable amounts of cpu, it will diff --git a/docs/manual.html b/docs/manual.html index 05c5ed038..67b7dbc98 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -147,183 +147,184 @@
bool is_listening() const; unsigned short listen_port() const; -bool listen_on( + +enum { + listen_reuse_address = 1, + listen_no_system_port = 2 +}; + +void listen_on( std::pair<int, int> const& port_range + , error_code& ec , char const* interface = 0 , int flags = 0);@@ -1178,12 +1191,16 @@ will be opened with these new settings. The port range is the ports it will try to listen on, if the first port fails, it will continue trying the next port within the range and so on. The interface parameter can be left as 0, in that case the os will decide which interface to listen on, otherwise it should be the ip-address -of the interface you want the listener socket bound to. listen_on() returns true -if it managed to open the socket, and false if it failed. If it fails, it will also -generate an appropriate alert (listen_failed_alert). If all ports in the specified -range fails to be opened for listening, libtorrent will try to use port 0 (which -tells the operating system to pick a port that's free). If that still fails you -may see a listen_failed_alert with port 0 even if you didn't ask to listen on it. +of the interface you want the listener socket bound to. listen_on() returns the +error code of the operation in ec. If this indicates success, the session is +listening on a port within the specified range. If it fails, it will also +generate an appropriate alert (listen_failed_alert). +
If all ports in the specified range fails to be opened for listening, libtorrent will +try to use port 0 (which tells the operating system to pick a port that's free). If +that still fails you may see a listen_failed_alert with port 0 even if you didn't +ask to listen on it.
+It is possible to prevent libtorrent from binding to port 0 by passing in the flag +session::no_system_port in the flags argument.
The interface parameter can also be a hostname that will resolve to the device you want to listen on. If you don't specify an interface, libtorrent may attempt to listen on multiple interfaces (typically 0.0.0.0 and ::). This means that if your @@ -2228,6 +2245,7 @@ struct torrent_handle std::string name() const; + enum save_resume_flags_t { flush_disk_cache = 1, save_info_dict = 2 }; void save_resume_data(int flags = 0) const; bool need_save_resume_data() const; void force_reannounce() const; @@ -2287,6 +2305,8 @@ struct torrent_handle void set_upload_mode(bool m) const; void set_share_mode(bool m) const; + void apply_ip_filter(bool b) const; + void flush_cache() const; void resolve_countries(bool r); @@ -2761,6 +2781,14 @@ not necessarily be downloaded, especially not the whole of it. Only parts that a to be distributed to more than 2 other peers are downloaded, and only if the previous prediction was correct.
+void apply_ip_filter(bool b) const; ++
Set to true to apply the session global IP filter to this torrent (which is the +default). Set to false to make this torrent ignore the IP filter.
+@@ -2968,14 +2996,18 @@ function, it means unlimited.save_resume_data()
+enum save_resume_flags_t { flush_disk_cache = 1, save_info_dict = 2 }; void save_resume_data(int flags = 0) const;save_resume_data() generates fast-resume data and returns it as an entry. This entry is suitable for being bencoded. For more information about how fast-resume works, see fast resume.
-The flags argument may be set to torrent_handle::flush_cache. Doing so will flush the disk -cache before creating the resume data. This avoids a problem with file timestamps in the resume -data in case the cache hasn't been flushed yet.
+The flags argument is a bitmask of flags ORed together. If the flag torrent_handle::flush_cache +is set, the disk cache will be flushed before creating the resume data. This avoids a problem with +file timestamps in the resume data in case the cache hasn't been flushed yet.
+If the flag torrent_handle::save_info_dict is set, the resume data will contain the metadata +from the torrent file as well. This is default for any torrent that's added without a torrent +file (such as a magnet link or a URL).
This operation is asynchronous, save_resume_data will return immediately. The resume data is delivered when it's done through an save_resume_data_alert.
The fast resume data will be empty in the following cases:
@@ -3336,6 +3368,7 @@ struct torrent_status int queue_position; bool need_save_resume; + bool ip_filter_applies; };handle is a handle to the torrent whose status the object represents.
@@ -3563,6 +3596,8 @@ queue. If the torrent is a seed or finished, this is -1.need_save_resume is true if this torrent has unsaved changes to its download state and statistics since the last resume data was saved.
+ip_filter_applies is true if the session global IP filter applies +to this torrent. This defaults to true.
version is automatically set to the libtorrent version you're using @@ -4859,7 +4898,9 @@ be changed individually later using
if broadcast_lsd is set to true, the local peer discovery (or Local Service Discovery) will not only use IP multicast, but also broadcast its messages. This can be useful when running on networks -that don't support multicast. It's off by default since it's inefficient.
+that don't support multicast. Since broadcast messages might be +expensive and disruptive on networks, only every 8th announce uses +broadcast.enable_outgoing_utp, enable_incoming_utp, enable_outgoing_tcp, enable_incoming_tcp all determines if libtorrent should attempt to make outgoing connections of the specific type, or allow incoming connection. By @@ -4872,6 +4913,12 @@ to accepted (torrents are more likely to be fully checked when loaded). It might be useful to set this to true if your network is faster than your disk, and it would be faster to redownload potentially missed pieces than to go through the whole storage to look for them.
+no_recheck_incomplete_resume determines if the storage should check +the whole files when resume data is incomplete or missing or whether +it should simply assume we don't have any of the data. By default, this +is determined by the existance of any of the files. By setting this setting +to true, the files won't be checked, but will go straight to download +mode.
anonymous_mode defaults to false. When set to true, the client tries to hide its identity to a certain degree. The peer-ID will no longer include the client's fingerprint. The user-agent will be reset to an @@ -4991,6 +5038,18 @@ alerts are not popped, the queue will eventually fill up to this level. This defaults to 1000.
max_metadata_size is the maximum allowed size (in bytes) to be received by the metadata extension, i.e. magnet links. It defaults to 1 MiB.
+smooth_connects is true by default, which means the number of connection +attempts per second may be limited to below the connection_speed, in case +we're close to bump up against the limit of number of connections. The intention +of this setting is to more evenly distribute our connection attempts over time, +instead of attempting to connectin in batches, and timing them out in batches.
+always_send_user_agent defaults to false. When set to true, web connections +will include a user-agent with every request, as opposed to just the first +request in a connection.
+apply_ip_filter_to_trackers defaults to true. It determines whether the +IP filter applies to trackers as well as peers. If this is set to false, +trackers are exempt from the IP filter (if there is one). If no IP filter +is set, this setting is irrelevant.
This is a debug alert that is generated by an incoming invalid piece request. -Ïp is the address of the peer and the request is the actual incoming +ìp is the address of the peer and the request is the actual incoming request from the peer.
struct invalid_request_alert: peer_alert @@ -7222,6 +7281,13 @@ potentially better peerThe peer sent an pex messages too often. This is a possible attempt of and attack +109 +no_metadata +The operation failed because it requires the torrent to have +the metadata (.torrent file) and it doesn't have it yet. +This happens for magnet links before they have downloaded the +metadata, and also torrents added by URL. +NAT-PMP errors:
@@ -7609,13 +7675,13 @@ std::string error_code_to_string(boost::system::error_code const& ec) static const char const* swedish[] = { "inget fel", - "en fil i torrenten kolliderar med en fil frÂn en annan torrent", + "en fil i torrenten kolliderar med en fil från en annan torrent", "hash check misslyckades", - "torrent filen ‰r inte en dictionary", - "'info'-nyckeln saknas eller ‰r korrupt i torrentfilen", - "'info'-f‰ltet ‰r inte en dictionary", - "'piece length' f‰ltet saknas eller ‰r korrupt i torrentfilen", - "torrentfilen saknar namnf‰ltet", + "torrent filen är inte en dictionary", + "'info'-nyckeln saknas eller är korrupt i torrentfilen", + "'info'-fältet är inte en dictionary", + "'piece length' fältet saknas eller är korrupt i torrentfilen", + "torrentfilen saknar namnfältet", "ogiltigt namn i torrentfilen (kan vara en attack)", // ... more strings here };