diff --git a/docs/make_torrent.html b/docs/make_torrent.html index 6f1080da7..280fe14ce 100644 --- a/docs/make_torrent.html +++ b/docs/make_torrent.html @@ -127,15 +127,15 @@ bencode(std::ostream_iterator<char>(out), t.generate());
@@ -145,11 +145,11 @@ refers to a diretory, files will be added recursively from the directory. is encountered. files for which p returns true are added, and directories for which p returns true are traversed. p must have the following signature:template <class Pred> -void add_files(file_storage& fs, boost::filesystem::path const& path, Pred p +void add_files(file_storage& fs, std::string const& path, Pred p , boost::uint32_t flags = 0); template <class Pred> -void add_files(file_storage& fs, boost::filesystem::wpath const& path, Pred p +void add_files(file_storage& fs, std::wstring const& path, Pred p , boost::uint32_t flags = 0); -void add_files(file_storage& fs, boost::filesystem::path const& path +void add_files(file_storage& fs, std::string const& path , boost::uint32_t flags = 0); -void add_files(file_storage& fs, boost::filesystem::wpath const& path +void add_files(file_storage& fs, std::wstring const& path , boost::uint32_t flags = 0);
-bool Pred(boost::filesystem::path const& p); +bool Pred(std::string const& p);-
and for the wpath version:
+and for the wide string version:
-bool Pred(boost::filesystem::wpath const& p); +bool Pred(std::wstring const& p);
The path that is passed in to the predicate is the full path of the file or directory. If no predicate is specified, all files are added, and all directories @@ -163,21 +163,21 @@ constructor.
@@ -211,8 +211,8 @@ public: }; void add_file(file_entry const& e); - void add_file(fs::path const& p, size_type size, int flags = 0); - void add_file(fs::wpath const& p, size_type size, int flags = 0); + void add_file(std::string const& p, size_type size, int flags = 0); + void add_file(std::wstring const& p, size_type size, int flags = 0); void rename_file(int index, std::string const& new_filename); void rename_file(int index, std::wstring const& new_filename); @@ -220,8 +220,8 @@ public: , int size) const; peer_request map_file(int file, size_type offset, int size) const; - typedef std::vector<file_entry>::const_iterator iterator; - typedef std::vector<file_entry>::const_reverse_iterator reverse_iterator; + typedef std::vector<internal_file_entry>::const_iterator iterator; + typedef std::vector<internal_file_entry>::const_reverse_iterator reverse_iterator; iterator begin() const; iterator end() const; @@ -229,7 +229,7 @@ public: reverse_iterator rend() const; int num_files() const; - file_entry const& at(int index) const; + file_entry at(int index) const; size_type total_size() const; void set_num_pieces(int n); @@ -238,12 +238,12 @@ public: int piece_length() const; int piece_size(int index) const; - sha1_hash const& hash(internal_file_entry const& fe) const; - std::string const& symlink(internal_file_entry const& fe) const; - time_t mtime(internal_file_entry const& fe) const; - int file_index(internal_file_entry const& fe) const; - size_type file_base(internal_file_entry const& fe) const; - void set_file_base(internal_file_entry const& fe, size_type off); + sha1_hash const& hash(int index) const; + std::string const& symlink(int index) const; + time_t mtime(int index) const; + int file_index(int index) const; + size_type file_base(int index) const; + void set_file_base(int index, size_type off); void set_name(std::string const& n); void set_name(std::wstring const& n); @@ -281,18 +281,14 @@ make sure this requirement is fulfilled.template <class Fun> -void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p, Fun f); +void set_piece_hashes(create_torrent& t, std::string const& p, Fun f); template <class Fun> -void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p, Fun f); +void set_piece_hashes(create_torrent& t, std::wstring const& p, Fun f); template <class Fun> -void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p, Fun f +void set_piece_hashes(create_torrent& t, std::string const& p, Fun f , error_code& ec); template <class Fun> -void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p, Fun f +void set_piece_hashes(create_torrent& t, std::wstring const& p, Fun f , error_code& ec); -void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p); -void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p); -void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p +void set_piece_hashes(create_torrent& t, std::string const& p); +void set_piece_hashes(create_torrent& t, std::wstring const& p); +void set_piece_hashes(create_torrent& t, std::string const& p , error_code& ec); -void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p +void set_piece_hashes(create_torrent& t, std::wstring const& p , error_code& ec);
-sha1_hash hash(internal_file_entry const& fe) const; -std::string const& symlink(internal_file_entry const& fe) const; -time_t mtime(internal_file_entry const& fe) const; -int file_index(internal_file_entry const& fe) const; +sha1_hash hash(int index) const; +std::string const& symlink(int index) const; +time_t mtime(int index) const; +int file_index(int index) const;
These functions are used to query the symlink, file hash, -modification time and the file-index from a internal_file_entry, -which typically would be acquired from an iterator.
-For these functions to function, the file entry must be an -actual object from this same file_storage object. It may -not be a copy.
+modification time and the file-index from a file index.The file hash is a sha-1 hash of the file, or 0 if none was provided in the torrent file. This can potentially be used to join a bittorrent network with other file sharing networks.
@@ -305,8 +301,8 @@ file as they are ordered in the torrent file.-size_type file_base(internal_file_entry const& fe) const; -void set_file_base(internal_file_entry const& fe, size_type off); +size_type file_base(int index) const; +void set_file_base(int index, size_type off);
The file base of a file is the offset within the file on the filsystem diff --git a/docs/manual.html b/docs/manual.html index 8c2b3676b..79eabf609 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -210,137 +210,138 @@
If the torrent doesn't have a tracker, but relies on the DHT to find peers, the -tracker_url can be 0, otherwise you might specify a tracker url that tracks this -torrent.
+trackers (or the deprecated tracker_url) can specify tracker urls that +for the torrent.If you specify a url, the torrent will be set in downloading_metadata state until the .torrent file has been downloaded. If there's any error while downloading, the torrent will be stopped and the torrent error state (torrent_status::error) -will indicate what went wrong. The url may also refer to a magnet link.
+will indicate what went wrong. The url may refer to a magnet link or a regular +http URL. +dht_nodes is a list of hostname and port pairs, representing DHT nodes to be +added to the session (if DHT is enabled). The hostname may be an IP address.
If the torrent you are trying to add already exists in the session (is either queued for checking, being checked or downloading) add_torrent() will throw libtorrent_exception which derives from std::exception unless duplicate_is_error @@ -4519,6 +4527,7 @@ struct session_settings int utp_connect_timeout; int utp_delayed_ack; bool utp_dynamic_sock_buf; + int utp_loss_multiplier; enum bandwidth_mixed_algo_t { @@ -5212,6 +5221,10 @@ or ethernet jumbo frames). This defaults to true and might improve uTP throughpu For RAM constrained systems, disabling this typically saves around 30kB in user space and probably around 400kB in kernel socket buffers (it adjusts the send and receive buffer size on the kernel socket, both for IPv4 and IPv6).
+utp_loss_multiplier controls how the congestion window is changed when a packet +loss is experienced. It's specified as a percentage multiplier for cwnd. By default +it's set to 50 (i.e. cut in half). Do not change this value unless you know what +you're doing. Never set it higher than 100.
The mixed_mode_algorithm determines how to treat TCP connections when there are
uTP connections. Since uTP is designed to yield to TCP, there's an inherent problem
when using swarms that have both TCP and uTP connections. If nothing is done, uTP
@@ -5832,6 +5845,7 @@ it will throw libtorr
deprecated For more information about magnet links, see magnet links. This function parses out information from the magnet link and populates the
+add_torrent_params object. 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.add_magnet_uri()
+
torrent_handle add_magnet_uri(session& ses, std::string const& uri
@@ -5851,6 +5865,16 @@ error and is not available when building without exception support.
link through add_torrent_params::url argument to session::add_torrent().
parse_magnet_uri()
+
+
+
+void parse_magnet_uri(std::string const& uri, add_torrent_params& p, error_code& ec);
+
+make_magnet_uri()
@@ -6481,7 +6505,7 @@ struct peer_disconnected_alert: peer_alert
invalid_request_alert
struct invalid_request_alert: peer_alert
@@ -6641,7 +6665,8 @@ struct performance_alert: torrent_alert
download_limit_too_low,
send_buffer_watermark_too_low,
too_many_optimistic_unchoke_slots,
- too_high_disk_queue_limit
+ too_high_disk_queue_limit,
+ too_few_outgoing_ports
};
performance_warning_t warning_code;
@@ -6706,6 +6731,11 @@ is posted. The disk write queue eats into the total disk cache and leaves very l
left for the actual cache. This causes the disk cache to oscillate in evicting large
portions of the cache before allowing peers to download any more, onto the disk write
queue. Either lower max_queued_disk_bytes or increase cache_size.
+