Electroneum
net_load_tests::test_levin_commands_handler Struct Reference

#include <net_load_tests.h>

Inheritance diagram for net_load_tests::test_levin_commands_handler:
Collaboration diagram for net_load_tests::test_levin_commands_handler:

Public Member Functions

 test_levin_commands_handler ()
 
virtual int invoke (int command, const epee::span< const uint8_t > in_buff, std::string &buff_out, test_connection_context &context)
 
virtual int notify (int command, const epee::span< const uint8_t > in_buff, test_connection_context &context)
 
virtual void callback (test_connection_context &context)
 
virtual void on_connection_new (test_connection_context &context)
 
virtual void on_connection_close (test_connection_context &context)
 
size_t new_connection_counter () const
 
size_t close_connection_counter () const
 
- Public Member Functions inherited from epee::levin::levin_commands_handler< test_connection_context >
virtual int invoke (int command, const epee::span< const uint8_t > in_buff, std::string &buff_out, test_connection_context &context)=0
 
virtual int notify (int command, const epee::span< const uint8_t > in_buff, test_connection_context &context)=0
 
virtual void callback (test_connection_context &context)
 
virtual void on_connection_new (test_connection_context &context)
 
virtual void on_connection_close (test_connection_context &context)
 
virtual ~levin_commands_handler ()
 

Protected Attributes

unit_test::call_counter m_new_connection_counter
 
unit_test::call_counter m_close_connection_counter
 

Detailed Description

Definition at line 59 of file net_load_tests.h.

Constructor & Destructor Documentation

◆ test_levin_commands_handler()

net_load_tests::test_levin_commands_handler::test_levin_commands_handler ( )
inline

Definition at line 61 of file net_load_tests.h.

64  {
65  }

Member Function Documentation

◆ callback()

virtual void net_load_tests::test_levin_commands_handler::callback ( test_connection_context context)
inlinevirtual

Definition at line 88 of file net_load_tests.h.

89  {
90  //m_callback_counter.inc();
91  //std::cout << "test_levin_commands_handler::callback()" << std::endl;
92  }

◆ close_connection_counter()

size_t net_load_tests::test_levin_commands_handler::close_connection_counter ( ) const
inline

Definition at line 110 of file net_load_tests.h.

110 { return m_close_connection_counter.get(); }
unit_test::call_counter m_close_connection_counter
size_t get() volatile const
Here is the call graph for this function:

◆ invoke()

virtual int net_load_tests::test_levin_commands_handler::invoke ( int  command,
const epee::span< const uint8_t in_buff,
std::string &  buff_out,
test_connection_context context 
)
inlinevirtual

Definition at line 67 of file net_load_tests.h.

68  {
69  //m_invoke_counter.inc();
70  //std::unique_lock<std::mutex> lock(m_mutex);
71  //m_last_command = command;
72  //m_last_in_buf = in_buff;
73  //buff_out = m_invoke_out_buf;
74  //return m_return_code;
75  return LEVIN_OK;
76  }
#define LEVIN_OK
Definition: levin_base.h:93

◆ new_connection_counter()

size_t net_load_tests::test_levin_commands_handler::new_connection_counter ( ) const
inline

Definition at line 109 of file net_load_tests.h.

109 { return m_new_connection_counter.get(); }
unit_test::call_counter m_new_connection_counter
size_t get() volatile const
Here is the call graph for this function:

◆ notify()

virtual int net_load_tests::test_levin_commands_handler::notify ( int  command,
const epee::span< const uint8_t in_buff,
test_connection_context context 
)
inlinevirtual

Definition at line 78 of file net_load_tests.h.

79  {
80  //m_notify_counter.inc();
81  //std::unique_lock<std::mutex> lock(m_mutex);
82  //m_last_command = command;
83  //m_last_in_buf = in_buff;
84  //return m_return_code;
85  return LEVIN_OK;
86  }
#define LEVIN_OK
Definition: levin_base.h:93

◆ on_connection_close()

virtual void net_load_tests::test_levin_commands_handler::on_connection_close ( test_connection_context context)
inlinevirtual

Definition at line 100 of file net_load_tests.h.

101  {
103  //std::cout << "test_levin_commands_handler::on_connection_close()" << std::endl;
104  }
unit_test::call_counter m_close_connection_counter
Here is the call graph for this function:

◆ on_connection_new()

virtual void net_load_tests::test_levin_commands_handler::on_connection_new ( test_connection_context context)
inlinevirtual

Definition at line 94 of file net_load_tests.h.

95  {
97  //std::cout << "test_levin_commands_handler::on_connection_new()" << std::endl;
98  }
unit_test::call_counter m_new_connection_counter
Here is the call graph for this function:

Member Data Documentation

◆ m_close_connection_counter

unit_test::call_counter net_load_tests::test_levin_commands_handler::m_close_connection_counter
protected

Definition at line 126 of file net_load_tests.h.

◆ m_new_connection_counter

unit_test::call_counter net_load_tests::test_levin_commands_handler::m_new_connection_counter
protected

Definition at line 125 of file net_load_tests.h.


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