#include <refresh.hpp>

Public Types | |
| typedef boost::function< void()> | done_callback |
Public Member Functions | |
| void | ping_reply (node_id id) |
| void | ping_timeout (node_id id, bool prevent_request=false) |
Static Public Member Functions | |
| template<class InIt> | |
| static void | initiate (node_id target, int branch_factor, int max_active_pings, int max_results, routing_table &table, InIt first, InIt last, rpc_manager &rpc, done_callback const &callback) |
Private Member Functions | |
| template<class InIt> | |
| refresh (node_id target, int branch_factor, int max_active_pings, int max_results, routing_table &table, InIt first, InIt last, rpc_manager &rpc, done_callback const &callback) | |
| void | done () |
| void | invoke (node_id const &id, udp::endpoint addr) |
| void | invoke_pings_or_finish (bool prevent_request=false) |
Private Attributes | |
| int | m_max_active_pings |
| int | m_active_pings |
| done_callback | m_done_callback |
| std::vector< result >::iterator | m_leftover_nodes_iterator |
Definition at line 53 of file refresh.hpp.
| typedef boost::function<void()> libtorrent::dht::refresh::done_callback |
Definition at line 56 of file refresh.hpp.
| libtorrent::dht::refresh::refresh | ( | node_id | target, | |
| int | branch_factor, | |||
| int | max_active_pings, | |||
| int | max_results, | |||
| routing_table & | table, | |||
| InIt | first, | |||
| InIt | last, | |||
| rpc_manager & | rpc, | |||
| done_callback const & | callback | |||
| ) | [inline, private] |
Definition at line 102 of file refresh.hpp.
References libtorrent::dht::traversal_algorithm::add_requests().
Referenced by initiate().
| void libtorrent::dht::refresh::initiate | ( | node_id | target, | |
| int | branch_factor, | |||
| int | max_active_pings, | |||
| int | max_results, | |||
| routing_table & | table, | |||
| InIt | first, | |||
| InIt | last, | |||
| rpc_manager & | rpc, | |||
| done_callback const & | callback | |||
| ) | [inline, static] |
Definition at line 131 of file refresh.hpp.
References refresh().
Referenced by libtorrent::dht::node_impl::bootstrap(), libtorrent::dht::node_impl::refresh(), and libtorrent::dht::node_impl::refresh_bucket().
| void libtorrent::dht::refresh::ping_reply | ( | node_id | id | ) |
Definition at line 148 of file refresh.cpp.
References invoke_pings_or_finish(), and m_active_pings.
Definition at line 154 of file refresh.cpp.
References invoke_pings_or_finish(), and m_active_pings.
| void libtorrent::dht::refresh::done | ( | ) | [private, virtual] |
Implements libtorrent::dht::traversal_algorithm.
Definition at line 140 of file refresh.cpp.
References invoke_pings_or_finish(), m_leftover_nodes_iterator, libtorrent::dht::traversal_algorithm::m_max_results, and libtorrent::dht::traversal_algorithm::m_results.
| void libtorrent::dht::refresh::invoke | ( | node_id const & | id, | |
| udp::endpoint | addr | |||
| ) | [private, virtual] |
Implements libtorrent::dht::traversal_algorithm.
Definition at line 129 of file refresh.cpp.
References libtorrent::dht::messages::find_node, libtorrent::dht::rpc_manager::invoke(), libtorrent::dht::traversal_algorithm::m_rpc, and libtorrent::dht::traversal_algorithm::m_target.
| void libtorrent::dht::refresh::invoke_pings_or_finish | ( | bool | prevent_request = false |
) | [private] |
Definition at line 160 of file refresh.cpp.
References libtorrent::dht::traversal_algorithm::result::addr, simple_client::e, libtorrent::dht::traversal_algorithm::result::flags, libtorrent::dht::traversal_algorithm::result::id, libtorrent::dht::traversal_algorithm::result::initial, libtorrent::dht::rpc_manager::invoke(), m_active_pings, m_done_callback, m_leftover_nodes_iterator, m_max_active_pings, libtorrent::dht::traversal_algorithm::m_results, libtorrent::dht::traversal_algorithm::m_rpc, and libtorrent::dht::messages::ping.
Referenced by done(), ping_reply(), and ping_timeout().
int libtorrent::dht::refresh::m_max_active_pings [private] |
int libtorrent::dht::refresh::m_active_pings [private] |
Definition at line 94 of file refresh.hpp.
Referenced by invoke_pings_or_finish(), ping_reply(), and ping_timeout().
std::vector<result>::iterator libtorrent::dht::refresh::m_leftover_nodes_iterator [private] |
1.5.6