Electroneum
epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context > Class Template Reference

#include <jsonrpc_protocol_handler.h>

Collaboration diagram for epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >:

Public Types

typedef t_connection_context connection_context
 
typedef jsonrpc2_server_config< t_connection_context > config_type
 

Public Member Functions

 jsonrpc2_connection_handler (i_service_endpoint *psnd_hndlr, config_type &config, t_connection_context &conn_context)
 
virtual ~jsonrpc2_connection_handler ()
 
bool release_protocol ()
 
virtual bool thread_init ()
 
virtual bool thread_deinit ()
 
void handle_qued_callback ()
 
bool after_init_connection ()
 
virtual bool handle_recv (const void *ptr, size_t cb)
 

Protected Attributes

i_service_endpointm_psnd_hndlr
 

Detailed Description

template<class t_connection_context = net_utils::connection_context_base>
class epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >

Definition at line 55 of file jsonrpc_protocol_handler.h.

Member Typedef Documentation

◆ config_type

template<class t_connection_context = net_utils::connection_context_base>
typedef jsonrpc2_server_config<t_connection_context> epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::config_type

Definition at line 59 of file jsonrpc_protocol_handler.h.

◆ connection_context

template<class t_connection_context = net_utils::connection_context_base>
typedef t_connection_context epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::connection_context

Definition at line 58 of file jsonrpc_protocol_handler.h.

Constructor & Destructor Documentation

◆ jsonrpc2_connection_handler()

template<class t_connection_context = net_utils::connection_context_base>
epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::jsonrpc2_connection_handler ( i_service_endpoint psnd_hndlr,
config_type config,
t_connection_context &  conn_context 
)
inline

Definition at line 61 of file jsonrpc_protocol_handler.h.

64  : m_psnd_hndlr(psnd_hndlr),
65  m_config(config),
66  m_conn_context(conn_context),
67  m_is_stop_handling(false)
68  {}

◆ ~jsonrpc2_connection_handler()

template<class t_connection_context = net_utils::connection_context_base>
virtual epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::~jsonrpc2_connection_handler ( )
inlinevirtual

Definition at line 69 of file jsonrpc_protocol_handler.h.

70  {}

Member Function Documentation

◆ after_init_connection()

template<class t_connection_context = net_utils::connection_context_base>
bool epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::after_init_connection ( )
inline

Definition at line 86 of file jsonrpc_protocol_handler.h.

87  {
88  return true;
89  }

◆ handle_qued_callback()

template<class t_connection_context = net_utils::connection_context_base>
void epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::handle_qued_callback ( )
inline

Definition at line 84 of file jsonrpc_protocol_handler.h.

85  {}

◆ handle_recv()

template<class t_connection_context = net_utils::connection_context_base>
virtual bool epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::handle_recv ( const void *  ptr,
size_t  cb 
)
inlinevirtual

Definition at line 90 of file jsonrpc_protocol_handler.h.

91  {
92  std::string buf((const char*)ptr, cb);
93  LOG_PRINT_L0("JSONRPC2_RECV: " << ptr << "\r\n" << buf);
94 
95  bool res = handle_buff_in(buf);
96  return res;
97  }
const char * res
Definition: hmac_keccak.cpp:41
::std::string string
Definition: gtest-port.h:1097
#define LOG_PRINT_L0(x)
Definition: misc_log_ex.h:99
const char * buf
Definition: slow_memmem.cpp:74

◆ release_protocol()

template<class t_connection_context = net_utils::connection_context_base>
bool epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::release_protocol ( )
inline

Definition at line 72 of file jsonrpc_protocol_handler.h.

73  {
74  return true;
75  }

◆ thread_deinit()

template<class t_connection_context = net_utils::connection_context_base>
virtual bool epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::thread_deinit ( )
inlinevirtual

Definition at line 80 of file jsonrpc_protocol_handler.h.

81  {
82  return true;
83  }

◆ thread_init()

template<class t_connection_context = net_utils::connection_context_base>
virtual bool epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::thread_init ( )
inlinevirtual

Definition at line 76 of file jsonrpc_protocol_handler.h.

77  {
78  return true;
79  }

Member Data Documentation

◆ m_psnd_hndlr

template<class t_connection_context = net_utils::connection_context_base>
i_service_endpoint* epee::net_utils::jsonrpc2::jsonrpc2_connection_handler< t_connection_context >::m_psnd_hndlr
protected

Definition at line 155 of file jsonrpc_protocol_handler.h.


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