diff --git a/docs/manual.rst b/docs/manual.rst index 036047867..282850f17 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -845,6 +845,12 @@ The default peer class IDs are defined as enums in the ``session`` class: local_peer_class_id }; +The default peer classes are automatically created on session startup, and +configured to apply to each respective type of connection. There's nothing +preventing a client from reconfiguring the peer class ip- and type filters +to disable or customize which peers they apply to. See set_peer_class_filter() +and set_peer_class_type_filter(). + A peer class can be considered a more general form of *lables* that some clients have. Peer classes however are not just applied to torrents, but ultimately the peers. @@ -854,9 +860,9 @@ object), and deleted with the delete_peer_class() call. Peer classes are configured with the set_peer_class() get_peer_class() calls. -Custom peer classes can be assigned to torrents, with the ??? call, in which -case all its peers will belong to the class. They can also be assigned based on -the peer's IP address. See set_peer_class_filter() for more information. +Custom peer classes can be assigned based on the peer's IP address or the type +of transport protocol used. See set_peer_class_filter() and +set_peer_class_type_filter() for more information. peer class examples ------------------- diff --git a/include/libtorrent/peer_class.hpp b/include/libtorrent/peer_class.hpp index 3c278ccb1..300282543 100644 --- a/include/libtorrent/peer_class.hpp +++ b/include/libtorrent/peer_class.hpp @@ -49,7 +49,9 @@ namespace libtorrent { typedef boost::uint32_t peer_class_t; - struct peer_class_info + // holds settings for a peer class. Used in set_peer_class() and + // get_peer_class() calls. + struct TORRENT_EXPORT peer_class_info { // ``ignore_unchoke_slots`` determines whether peers should always // unchoke a peer, regardless of the choking algorithm, or if it should diff --git a/include/libtorrent/session_handle.hpp b/include/libtorrent/session_handle.hpp index 3d9caefd1..7f8620ae6 100644 --- a/include/libtorrent/session_handle.hpp +++ b/include/libtorrent/session_handle.hpp @@ -708,7 +708,7 @@ namespace libtorrent // return value of ``get_peer_class()`` is undefined. // // ``set_peer_class()`` sets all the information in the - // ``peer_class_info`` object in the specified peer class. There is no + // peer_class_info object in the specified peer class. There is no // option to only update a single property. // // A peer or torrent belonging to more than one class, the highest