libtorrent::dht::rpc_manager Class Reference

#include <rpc_manager.hpp>

List of all members.

Public Types

typedef boost::function1< void,
msg const & > 
fun
typedef boost::function1< void,
msg const & > 
send_fun

Public Member Functions

 rpc_manager (fun const &incoming_fun, node_id const &our_id, routing_table &table, send_fun const &sf)
 ~rpc_manager ()
bool incoming (msg const &)
boost::posix_time::time_duration tick ()
void invoke (int message_id, udp::endpoint target, boost::shared_ptr< observer > o)
void reply (msg &m, msg const &reply_to)
void reply_with_ping (msg &m, msg const &reply_to)
void check_invariant () const

Private Types

enum  { max_transactions = 2048 }
typedef boost::array
< boost::shared_ptr< observer >
, max_transactions > 
transactions_t

Private Member Functions

unsigned int new_transaction_id (boost::shared_ptr< observer > o)
void update_oldest_transaction_id ()
boost::uint32_t calc_connection_id (udp::endpoint addr)

Private Attributes

transactions_t m_transactions
std::vector< boost::shared_ptr
< observer > > 
m_aborted_transactions
int m_next_transaction_id
int m_oldest_transaction_id
fun m_incoming
send_fun m_send
node_id m_our_id
routing_tablem_table
boost::posix_time::ptime m_timer
node_id m_random_number
bool m_destructing


Detailed Description

Definition at line 144 of file rpc_manager.hpp.


Member Typedef Documentation

typedef boost::function1<void, msg const&> libtorrent::dht::rpc_manager::fun

Definition at line 147 of file rpc_manager.hpp.

typedef boost::function1<void, msg const&> libtorrent::dht::rpc_manager::send_fun

Definition at line 148 of file rpc_manager.hpp.

typedef boost::array<boost::shared_ptr<observer>, max_transactions> libtorrent::dht::rpc_manager::transactions_t [private]

Definition at line 178 of file rpc_manager.hpp.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
max_transactions 

Definition at line 170 of file rpc_manager.hpp.


Constructor & Destructor Documentation

libtorrent::dht::rpc_manager::rpc_manager ( fun const &  incoming_fun,
node_id const &  our_id,
routing_table table,
send_fun const &  sf 
)

Definition at line 40 of file rpc_manager.cpp.

libtorrent::dht::rpc_manager::~rpc_manager (  ) 


Member Function Documentation

bool libtorrent::dht::rpc_manager::incoming ( msg const &  m  ) 

time_duration libtorrent::dht::rpc_manager::tick (  ) 

void libtorrent::dht::rpc_manager::invoke ( int  message_id,
udp::endpoint  target,
boost::shared_ptr< observer o 
)

void libtorrent::dht::rpc_manager::reply ( msg m,
msg const &  reply_to 
)

void libtorrent::dht::rpc_manager::reply_with_ping ( msg m,
msg const &  reply_to 
)

void libtorrent::dht::rpc_manager::check_invariant (  )  const

unsigned int libtorrent::dht::rpc_manager::new_transaction_id ( boost::shared_ptr< observer o  )  [private]

Referenced by reply_with_ping().

void libtorrent::dht::rpc_manager::update_oldest_transaction_id (  )  [private]

boost::uint32_t libtorrent::dht::rpc_manager::calc_connection_id ( udp::endpoint  addr  )  [private]


Member Data Documentation

std::vector<boost::shared_ptr<observer> > libtorrent::dht::rpc_manager::m_aborted_transactions [private]

Definition at line 180 of file rpc_manager.hpp.

Referenced by tick(), and ~rpc_manager().

Definition at line 183 of file rpc_manager.hpp.

Referenced by check_invariant(), and tick().

Definition at line 188 of file rpc_manager.hpp.

Referenced by check_invariant(), tick(), and update_oldest_transaction_id().

Definition at line 190 of file rpc_manager.hpp.

Referenced by incoming().

Definition at line 191 of file rpc_manager.hpp.

Referenced by reply(), and reply_with_ping().

Definition at line 192 of file rpc_manager.hpp.

Referenced by incoming(), reply(), and reply_with_ping().

Definition at line 193 of file rpc_manager.hpp.

Referenced by incoming().

boost::posix_time::ptime libtorrent::dht::rpc_manager::m_timer [private]

Definition at line 194 of file rpc_manager.hpp.

Definition at line 195 of file rpc_manager.hpp.

Definition at line 196 of file rpc_manager.hpp.

Referenced by incoming(), reply(), reply_with_ping(), and ~rpc_manager().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:47 2008 by  doxygen 1.5.6