docs:class dht_stats_alert
master255 opened this issue · comments
Oleg commented
@arvidn Documentation under heading "class dht_stats_alert" could be improved
There is no mention anywhere in the code:
sha1_hash nid;
aux::noexcept_movableudp::endpoint local_endpoint;
Arvid Norberg commented
when you say "code", do you mean "documentation"?
Do you find these descriptions insufficient?
nid
the node ID of the DHT node instancelocal_endpoint
the local socket this DHT node is running on
Oleg commented
@arvidn In fact, the code is like this:
struct TORRENT_EXPORT dht_stats_alert final : alert
{
// internal
dht_stats_alert(aux::stack_allocator& alloc
, std::vector<dht_routing_bucket> table
, std::vector<dht_lookup> requests);
TORRENT_DEFINE_ALERT(dht_stats_alert, 83)
static constexpr alert_category_t static_category = alert_category::stats;
std::string message() const override;
// a vector of the currently running DHT lookups.
std::vector<dht_lookup> active_requests;
// contains information about every bucket in the DHT routing
// table.
std::vector<dht_routing_bucket> routing_table;
};
Nothing about these variables
Arvid Norberg commented
no, the code is like this: https://github.com/arvidn/libtorrent/blob/RC_2_0/include/libtorrent/alert_types.hpp#L2509