improve peer class documentation
This commit is contained in:
parent
cfd50ae736
commit
4e452c7bb6
|
@ -845,6 +845,12 @@ The default peer class IDs are defined as enums in the ``session`` class:
|
||||||
local_peer_class_id
|
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
|
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
|
clients have. Peer classes however are not just applied to torrents, but
|
||||||
ultimately the peers.
|
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.
|
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
|
Custom peer classes can be assigned based on the peer's IP address or the type
|
||||||
case all its peers will belong to the class. They can also be assigned based on
|
of transport protocol used. See set_peer_class_filter() and
|
||||||
the peer's IP address. See set_peer_class_filter() for more information.
|
set_peer_class_type_filter() for more information.
|
||||||
|
|
||||||
peer class examples
|
peer class examples
|
||||||
-------------------
|
-------------------
|
||||||
|
|
|
@ -49,7 +49,9 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
typedef boost::uint32_t peer_class_t;
|
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
|
// ``ignore_unchoke_slots`` determines whether peers should always
|
||||||
// unchoke a peer, regardless of the choking algorithm, or if it should
|
// unchoke a peer, regardless of the choking algorithm, or if it should
|
||||||
|
|
|
@ -708,7 +708,7 @@ namespace libtorrent
|
||||||
// return value of ``get_peer_class()`` is undefined.
|
// return value of ``get_peer_class()`` is undefined.
|
||||||
//
|
//
|
||||||
// ``set_peer_class()`` sets all the information in the
|
// ``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.
|
// option to only update a single property.
|
||||||
//
|
//
|
||||||
// A peer or torrent belonging to more than one class, the highest
|
// A peer or torrent belonging to more than one class, the highest
|
||||||
|
|
Loading…
Reference in New Issue