Monero
Loading...
Searching...
No Matches
epee::levin::async_protocol_handler_config< t_connection_context > Class Template Reference

#include <levin_protocol_handler_async.h>

Collaboration diagram for epee::levin::async_protocol_handler_config< t_connection_context >:

Public Types

typedef t_connection_context connection_context

Public Member Functions

int invoke (int command, message_writer in_msg, std::string &buff_out, boost::uuids::uuid connection_id)
template<class callback_t>
int invoke_async (int command, message_writer in_msg, boost::uuids::uuid connection_id, const callback_t &cb, size_t timeout=LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED)
int send (epee::byte_slice message, const boost::uuids::uuid &connection_id)
bool close (boost::uuids::uuid connection_id)
bool update_connection_context (const t_connection_context &contxt)
bool request_callback (boost::uuids::uuid connection_id)
template<class callback_t>
bool foreach_connection (const callback_t &cb)
template<class callback_t>
bool for_connection (const boost::uuids::uuid &connection_id, const callback_t &cb)
size_t get_connections_count ()
size_t get_out_connections_count ()
size_t get_in_connections_count ()
void set_handler (levin_commands_handler< t_connection_context > *handler, void(*destroy)(levin_commands_handler< t_connection_context > *)=NULL)
 async_protocol_handler_config ()
 ~async_protocol_handler_config ()
void del_out_connections (size_t count)
void del_in_connections (size_t count)

Public Attributes

uint64_t m_initial_max_packet_size
uint64_t m_max_packet_size
uint64_t m_invoke_timeout

Private Types

typedef boost::unordered_map< boost::uuids::uuid, async_protocol_handler< t_connection_context > * > connections_map

Private Member Functions

void add_connection (async_protocol_handler< t_connection_context > *pc)
void del_connection (async_protocol_handler< t_connection_context > *pc)
async_protocol_handler< t_connection_context > * find_connection (boost::uuids::uuid connection_id) const
int find_and_lock_connection (boost::uuids::uuid connection_id, async_protocol_handler< t_connection_context > *&aph)
void delete_connections (size_t count, bool incoming)

Private Attributes

critical_section m_connects_lock
connections_map m_connects
levin_commands_handler< t_connection_context > * m_pcommands_handler
void(* m_pcommands_handler_destroy )(levin_commands_handler< t_connection_context > *)

Friends

class async_protocol_handler< t_connection_context >

Member Typedef Documentation

◆ connection_context

template<class t_connection_context>
typedef t_connection_context epee::levin::async_protocol_handler_config< t_connection_context >::connection_context

◆ connections_map

template<class t_connection_context>
typedef boost::unordered_map<boost::uuids::uuid, async_protocol_handler<t_connection_context>* > epee::levin::async_protocol_handler_config< t_connection_context >::connections_map
private

Constructor & Destructor Documentation

◆ async_protocol_handler_config()

template<class t_connection_context>
epee::levin::async_protocol_handler_config< t_connection_context >::async_protocol_handler_config ( )
inline

◆ ~async_protocol_handler_config()

template<class t_connection_context>
epee::levin::async_protocol_handler_config< t_connection_context >::~async_protocol_handler_config ( )
inline

Member Function Documentation

◆ add_connection()

template<class t_connection_context>
void epee::levin::async_protocol_handler_config< t_connection_context >::add_connection ( async_protocol_handler< t_connection_context > * pc)
private

◆ close()

template<class t_connection_context>
bool epee::levin::async_protocol_handler_config< t_connection_context >::close ( boost::uuids::uuid connection_id)

◆ del_connection()

template<class t_connection_context>
void epee::levin::async_protocol_handler_config< t_connection_context >::del_connection ( async_protocol_handler< t_connection_context > * pc)
private

◆ del_in_connections()

template<class t_connection_context>
void epee::levin::async_protocol_handler_config< t_connection_context >::del_in_connections ( size_t count)

◆ del_out_connections()

template<class t_connection_context>
void epee::levin::async_protocol_handler_config< t_connection_context >::del_out_connections ( size_t count)

◆ delete_connections()

template<class t_connection_context>
void epee::levin::async_protocol_handler_config< t_connection_context >::delete_connections ( size_t count,
bool incoming )
private

◆ find_and_lock_connection()

template<class t_connection_context>
int epee::levin::async_protocol_handler_config< t_connection_context >::find_and_lock_connection ( boost::uuids::uuid connection_id,
async_protocol_handler< t_connection_context > *& aph )
private

◆ find_connection()

template<class t_connection_context>
async_protocol_handler< t_connection_context > * epee::levin::async_protocol_handler_config< t_connection_context >::find_connection ( boost::uuids::uuid connection_id) const
private

◆ for_connection()

template<class t_connection_context>
template<class callback_t>
bool epee::levin::async_protocol_handler_config< t_connection_context >::for_connection ( const boost::uuids::uuid & connection_id,
const callback_t & cb )

◆ foreach_connection()

template<class t_connection_context>
template<class callback_t>
bool epee::levin::async_protocol_handler_config< t_connection_context >::foreach_connection ( const callback_t & cb)

◆ get_connections_count()

template<class t_connection_context>
size_t epee::levin::async_protocol_handler_config< t_connection_context >::get_connections_count ( )

◆ get_in_connections_count()

template<class t_connection_context>
size_t epee::levin::async_protocol_handler_config< t_connection_context >::get_in_connections_count ( )

◆ get_out_connections_count()

template<class t_connection_context>
size_t epee::levin::async_protocol_handler_config< t_connection_context >::get_out_connections_count ( )

◆ invoke()

template<class t_connection_context>
int epee::levin::async_protocol_handler_config< t_connection_context >::invoke ( int command,
message_writer in_msg,
std::string & buff_out,
boost::uuids::uuid connection_id )

◆ invoke_async()

template<class t_connection_context>
template<class callback_t>
int epee::levin::async_protocol_handler_config< t_connection_context >::invoke_async ( int command,
message_writer in_msg,
boost::uuids::uuid connection_id,
const callback_t & cb,
size_t timeout = LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED )

◆ request_callback()

template<class t_connection_context>
bool epee::levin::async_protocol_handler_config< t_connection_context >::request_callback ( boost::uuids::uuid connection_id)

◆ send()

template<class t_connection_context>
int epee::levin::async_protocol_handler_config< t_connection_context >::send ( epee::byte_slice message,
const boost::uuids::uuid & connection_id )

◆ set_handler()

template<class t_connection_context>
void epee::levin::async_protocol_handler_config< t_connection_context >::set_handler ( levin_commands_handler< t_connection_context > * handler,
void(* destroy )(levin_commands_handler< t_connection_context > *) = NULL )

◆ update_connection_context()

template<class t_connection_context>
bool epee::levin::async_protocol_handler_config< t_connection_context >::update_connection_context ( const t_connection_context & contxt)

◆ async_protocol_handler< t_connection_context >

template<class t_connection_context>
friend class async_protocol_handler< t_connection_context >
friend

Member Data Documentation

◆ m_connects

template<class t_connection_context>
connections_map epee::levin::async_protocol_handler_config< t_connection_context >::m_connects
private

◆ m_connects_lock

template<class t_connection_context>
critical_section epee::levin::async_protocol_handler_config< t_connection_context >::m_connects_lock
private

◆ m_initial_max_packet_size

template<class t_connection_context>
uint64_t epee::levin::async_protocol_handler_config< t_connection_context >::m_initial_max_packet_size

◆ m_invoke_timeout

template<class t_connection_context>
uint64_t epee::levin::async_protocol_handler_config< t_connection_context >::m_invoke_timeout

◆ m_max_packet_size

template<class t_connection_context>
uint64_t epee::levin::async_protocol_handler_config< t_connection_context >::m_max_packet_size

◆ m_pcommands_handler

template<class t_connection_context>
levin_commands_handler<t_connection_context>* epee::levin::async_protocol_handler_config< t_connection_context >::m_pcommands_handler
private

◆ m_pcommands_handler_destroy

template<class t_connection_context>
void(* epee::levin::async_protocol_handler_config< t_connection_context >::m_pcommands_handler_destroy) (levin_commands_handler< t_connection_context > *)
private

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