Electroneum
Loading...
Searching...
No Matches
daemonize::t_protocol Class Referencefinal

#include <protocol.h>

Public Member Functions

 t_protocol (boost::program_options::variables_map const &vm, t_core &core, bool offline=false)
t_protocol_raw & get ()
void set_p2p_endpoint (t_node_server &server)
 ~t_protocol ()

Detailed Description

Definition at line 40 of file protocol.h.

Constructor & Destructor Documentation

◆ t_protocol()

daemonize::t_protocol::t_protocol ( boost::program_options::variables_map const & vm,
t_core & core,
bool offline = false )
inline

Definition at line 48 of file protocol.h.

52 : m_protocol{core.get(), nullptr, offline}
53 {
54 MGINFO("Initializing cryptonote protocol...");
55 if (!m_protocol.init(vm))
56 {
57 throw std::runtime_error("Failed to initialize cryptonote protocol.");
58 }
59 MGINFO("Cryptonote protocol initialized OK");
60 }
#define MGINFO(x)
Definition misc_log_ex.h:80
Here is the call graph for this function:

◆ ~t_protocol()

daemonize::t_protocol::~t_protocol ( )
inline

Definition at line 74 of file protocol.h.

75 {
76 MGINFO("Stopping cryptonote protocol...");
77 try {
78 m_protocol.deinit();
79 m_protocol.set_p2p_endpoint(nullptr);
80 MGINFO("Cryptonote protocol stopped successfully");
81 } catch (...) {
82 LOG_ERROR("Failed to stop cryptonote protocol!");
83 }
84 }
#define LOG_ERROR(x)
Definition misc_log_ex.h:98

Member Function Documentation

◆ get()

t_protocol_raw & daemonize::t_protocol::get ( )
inline

Definition at line 62 of file protocol.h.

63 {
64 return m_protocol;
65 }
Here is the caller graph for this function:

◆ set_p2p_endpoint()

void daemonize::t_protocol::set_p2p_endpoint ( t_node_server & server)
inline

Definition at line 67 of file protocol.h.

70 {
71 m_protocol.set_p2p_endpoint(&server);
72 }

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/daemon/protocol.h