#include <traversal_algorithm.hpp>

Public Member Functions | |
| void | traverse (node_id const &id, udp::endpoint addr) |
| void | finished (node_id const &id) |
| void | failed (node_id const &id, bool prevent_request=false) |
| virtual | ~traversal_algorithm () |
Protected Member Functions | |
| template<class InIt> | |
| traversal_algorithm (node_id target, int branch_factor, int max_results, routing_table &table, rpc_manager &rpc, InIt start, InIt end) | |
| void | add_requests () |
| void | add_entry (node_id const &id, udp::endpoint addr, unsigned char flags) |
| virtual void | done ()=0 |
| virtual void | invoke (node_id const &id, udp::endpoint addr)=0 |
| std::vector< result >::iterator | last_iterator () |
Protected Attributes | |
| int | m_ref_count |
| node_id | m_target |
| int | m_branch_factor |
| int | m_max_results |
| std::vector< result > | m_results |
| std::set< udp::endpoint > | m_failed |
| routing_table & | m_table |
| rpc_manager & | m_rpc |
| int | m_invoke_count |
Friends | |
| void | intrusive_ptr_add_ref (traversal_algorithm *p) |
| void | intrusive_ptr_release (traversal_algorithm *p) |
Classes | |
| struct | result |
Definition at line 56 of file traversal_algorithm.hpp.
| virtual libtorrent::dht::traversal_algorithm::~traversal_algorithm | ( | ) | [inline, virtual] |
Definition at line 62 of file traversal_algorithm.hpp.
| libtorrent::dht::traversal_algorithm::traversal_algorithm | ( | node_id | target, | |
| int | branch_factor, | |||
| int | max_results, | |||
| routing_table & | table, | |||
| rpc_manager & | rpc, | |||
| InIt | start, | |||
| InIt | end | |||
| ) | [inline, protected] |
Definition at line 120 of file traversal_algorithm.hpp.
References add_entry(), asio::detail::socket_ops::bind(), libtorrent::dht::traversal_algorithm::result::initial, libtorrent::dht::routing_table::router_begin(), and libtorrent::dht::routing_table::router_end().
| void libtorrent::dht::traversal_algorithm::traverse | ( | node_id const & | id, | |
| udp::endpoint | addr | |||
| ) |
| void libtorrent::dht::traversal_algorithm::finished | ( | node_id const & | id | ) |
Definition at line 58 of file traversal_algorithm.cpp.
References add_requests(), done(), and m_invoke_count.
| void libtorrent::dht::traversal_algorithm::failed | ( | node_id const & | id, | |
| bool | prevent_request = false | |||
| ) |
Definition at line 65 of file traversal_algorithm.cpp.
References add_requests(), asio::detail::socket_ops::bind(), done(), libtorrent::dht::traversal_algorithm::result::id, asio::placeholders::iterator, m_branch_factor, m_failed, m_invoke_count, m_results, m_table, libtorrent::dht::routing_table::node_failed(), libtorrent::dht::traversal_algorithm::result::queried, and TORRENT_LOG.
| void libtorrent::dht::traversal_algorithm::add_requests | ( | ) | [protected] |
Definition at line 111 of file traversal_algorithm.cpp.
References asio::detail::socket_ops::bind(), libtorrent::dht::bitwise_nand(), simple_client::e, libtorrent::dht::traversal_algorithm::result::flags, invoke(), asio::placeholders::iterator, last_iterator(), m_branch_factor, m_invoke_count, m_results, libtorrent::dht::traversal_algorithm::result::queried, and TORRENT_LOG.
Referenced by libtorrent::dht::closest_nodes::closest_nodes(), failed(), libtorrent::dht::find_data::find_data(), finished(), and libtorrent::dht::refresh::refresh().
| void libtorrent::dht::traversal_algorithm::add_entry | ( | node_id const & | id, | |
| udp::endpoint | addr, | |||
| unsigned char | flags | |||
| ) | [protected] |
Definition at line 23 of file traversal_algorithm.cpp.
References asio::detail::socket_ops::bind(), libtorrent::dht::compare_ref(), libtorrent::dht::traversal_algorithm::result::id, asio::placeholders::iterator, m_failed, m_results, m_target, and TORRENT_LOG.
Referenced by traversal_algorithm(), and traverse().
| virtual void libtorrent::dht::traversal_algorithm::done | ( | ) | [protected, pure virtual] |
Implemented in libtorrent::dht::closest_nodes, libtorrent::dht::find_data, and libtorrent::dht::refresh.
Referenced by failed(), and finished().
| virtual void libtorrent::dht::traversal_algorithm::invoke | ( | node_id const & | id, | |
| udp::endpoint | addr | |||
| ) | [protected, pure virtual] |
Implemented in libtorrent::dht::closest_nodes, libtorrent::dht::find_data, and libtorrent::dht::refresh.
Referenced by add_requests().
| std::vector< traversal_algorithm::result >::iterator libtorrent::dht::traversal_algorithm::last_iterator | ( | ) | [protected] |
Definition at line 142 of file traversal_algorithm.cpp.
References m_max_results, and m_results.
Referenced by add_requests().
| void intrusive_ptr_add_ref | ( | traversal_algorithm * | p | ) | [friend] |
Definition at line 96 of file traversal_algorithm.hpp.
| void intrusive_ptr_release | ( | traversal_algorithm * | p | ) | [friend] |
Definition at line 101 of file traversal_algorithm.hpp.
int libtorrent::dht::traversal_algorithm::m_ref_count [protected] |
Definition at line 107 of file traversal_algorithm.hpp.
Definition at line 109 of file traversal_algorithm.hpp.
Referenced by add_entry(), libtorrent::dht::refresh::invoke(), libtorrent::dht::find_data::invoke(), and libtorrent::dht::closest_nodes::invoke().
int libtorrent::dht::traversal_algorithm::m_branch_factor [protected] |
int libtorrent::dht::traversal_algorithm::m_max_results [protected] |
Definition at line 111 of file traversal_algorithm.hpp.
Referenced by libtorrent::dht::refresh::done(), and last_iterator().
std::vector<result> libtorrent::dht::traversal_algorithm::m_results [protected] |
Definition at line 112 of file traversal_algorithm.hpp.
Referenced by add_entry(), add_requests(), libtorrent::dht::refresh::done(), libtorrent::dht::closest_nodes::done(), failed(), libtorrent::dht::refresh::invoke_pings_or_finish(), and last_iterator().
std::set<udp::endpoint> libtorrent::dht::traversal_algorithm::m_failed [protected] |
Definition at line 114 of file traversal_algorithm.hpp.
Referenced by libtorrent::dht::closest_nodes::done(), and failed().
rpc_manager& libtorrent::dht::traversal_algorithm::m_rpc [protected] |
Definition at line 115 of file traversal_algorithm.hpp.
Referenced by libtorrent::dht::refresh::invoke(), libtorrent::dht::find_data::invoke(), libtorrent::dht::closest_nodes::invoke(), and libtorrent::dht::refresh::invoke_pings_or_finish().
int libtorrent::dht::traversal_algorithm::m_invoke_count [protected] |
Definition at line 116 of file traversal_algorithm.hpp.
Referenced by add_requests(), libtorrent::dht::find_data::done(), failed(), finished(), and libtorrent::dht::find_data::invoke().
1.5.6