From feb2fd34d6f03bd0ada35aaa52f26ed3469b3145 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Wed, 10 Feb 2016 11:58:09 -0500 Subject: [PATCH] Documentation typos and new lines --- include/libtorrent/alert_types.hpp | 4 ++-- include/libtorrent/kademlia/dht_storage.hpp | 6 +++++- include/libtorrent/session.hpp | 2 +- include/libtorrent/torrent_handle.hpp | 8 ++++---- include/libtorrent/torrent_info.hpp | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index d84e18c14..f233d185b 100644 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -2009,14 +2009,14 @@ namespace libtorrent // the sequence number of this item boost::uint64_t seq; - // the salf, if any, used to lookup and store this item. If no + // the salt, if any, used to lookup and store this item. If no // salt was used, this is an empty string std::string salt; // the data for this item entry item; - // the last response for mutable date is authoritative. + // the last response for mutable data is authoritative. bool authoritative; }; diff --git a/include/libtorrent/kademlia/dht_storage.hpp b/include/libtorrent/kademlia/dht_storage.hpp index 8bffb9bcb..7e57522d2 100644 --- a/include/libtorrent/kademlia/dht_storage.hpp +++ b/include/libtorrent/kademlia/dht_storage.hpp @@ -115,6 +115,7 @@ namespace dht virtual bool get_peers(sha1_hash const& info_hash , bool noseed, bool scrape , entry& peers) const = 0; + // This function is named announce_peer for consistency with the // upper layers, but has nothing to do with networking. Its only // responsibility is store the peer in such a way that it's returned @@ -139,6 +140,7 @@ namespace dht // virtual bool get_immutable_item(sha1_hash const& target , entry& item) const = 0; + // Store the item's data. This layer is only for storage. // The authentication of the item is performed by the upper layer. // @@ -158,6 +160,7 @@ namespace dht // virtual bool get_mutable_item_seq(sha1_hash const& target , boost::int64_t& seq) const = 0; + // This function retrieves the mutable stored in the DHT. // // For implementers: @@ -166,7 +169,7 @@ namespace dht // the following keys should be filled // item["v"] - with the value no encoded. // item["sig"] - with a string representation of the signature. - // item["k"] - with a string represnetation of the public key. + // item["k"] - with a string representation of the public key. // // returns true if the item is found and the data is returned // inside the (entry) out parameter item. @@ -174,6 +177,7 @@ namespace dht virtual bool get_mutable_item(sha1_hash const& target , boost::int64_t seq, bool force_fill , entry& item) const = 0; + // Store the item's data. This layer is only for storage. // The authentication of the item is performed by the upper layer. // diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index 3fee69802..7f0f85264 100644 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -263,7 +263,7 @@ namespace libtorrent // it to finish. The timeout can be set with apply_settings(). ~session(); - // In case you want to destruct the session asynchrounously, you can + // In case you want to destruct the session asynchronously, you can // request a session destruction proxy. If you don't do this, the // destructor of the session object will block while the trackers are // contacted. If you keep one ``session_proxy`` to the session when diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index ab749cc43..c04dfaadb 100644 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -984,7 +984,7 @@ namespace libtorrent // string containing one or more, comma separated, ip-address (either an // IPv4 or IPv6 address). When specifying multiple interfaces, the // torrent will round-robin which interface to use for each outgoing - // conneciton. This is useful for clients that are multi-homed. + // connection. This is useful for clients that are multi-homed. void use_interface(const char* net_interface) const; // Fills the specified ``std::vector`` with the availability for @@ -993,17 +993,17 @@ namespace libtorrent // for all pieces is reported as 0. // // The piece availability is the number of peers that we are connected - // that has advertized having a particular piece. This is the information + // that has advertised having a particular piece. This is the information // that libtorrent uses in order to prefer picking rare pieces. void piece_availability(std::vector& avail) const; - // These functions are used to set and get the prioritiy of individual + // These functions are used to set and get the priority of individual // pieces. By default all pieces have priority 4. That means that the // random rarest first algorithm is effectively active for all pieces. // You may however change the priority of individual pieces. There are 8 // priority levels. 0 means not to download the piece at all. Otherwise, // lower priority values means less likely to be picked. Piece priority - // takes presedence over piece availability. Every priority-7 piece will + // takes precedence over piece availability. Every priority-7 piece will // be attempted to be picked before a priority 6 piece and so on. // // Piece priorities can not be changed for torrents that have not diff --git a/include/libtorrent/torrent_info.hpp b/include/libtorrent/torrent_info.hpp index 4e4fa5ab9..84e13b490 100644 --- a/include/libtorrent/torrent_info.hpp +++ b/include/libtorrent/torrent_info.hpp @@ -287,8 +287,8 @@ namespace libtorrent // ``set_web_seeds()`` replaces all web seeds with the ones specified in // the ``seeds`` vector. // - // The ``extern_auth`` argument can be used for other athorization - // schemese than basic HTTP authorization. If set, it will override any + // The ``extern_auth`` argument can be used for other authorization + // schemes than basic HTTP authorization. If set, it will override any // username and password found in the URL itself. The string will be sent // as the HTTP authorization header's value (without specifying "Basic"). //