#include <rpc.h>
|
| static void | init_options (boost::program_options::options_description &option_spec) |
Definition at line 42 of file rpc.h.
◆ t_rpc()
| daemonize::t_rpc::t_rpc |
( |
boost::program_options::variables_map const & | vm, |
|
|
t_core & | core, |
|
|
t_p2p & | p2p, |
|
|
const bool | restricted, |
|
|
const std::string & | port, |
|
|
const std::string & | description ) |
|
inline |
Definition at line 53 of file rpc.h.
61 : m_server{core.get(), p2p.get()}, m_description{description}
62 {
63 MGINFO(
"Initializing " << m_description <<
" RPC server...");
64
65 if (!m_server.init(vm, restricted, port))
66 {
67 throw std::runtime_error("Failed to initialize " + m_description + " RPC server.");
68 }
69 MGINFO(m_description <<
" RPC server initialized OK on port: " << m_server.get_binded_port());
70 }
◆ ~t_rpc()
| daemonize::t_rpc::~t_rpc |
( |
| ) |
|
|
inline |
Definition at line 94 of file rpc.h.
95 {
96 MGINFO(
"Deinitializing " << m_description <<
" RPC server...");
97 try {
98 m_server.deinit();
99 } catch (...) {
100 MERROR(
"Failed to deinitialize " << m_description <<
" RPC server...");
101 }
102 }
◆ get_server()
Definition at line 89 of file rpc.h.
90 {
91 return &m_server;
92 }
◆ init_options()
| void daemonize::t_rpc::init_options |
( |
boost::program_options::options_description & | option_spec | ) |
|
|
inlinestatic |
Definition at line 45 of file rpc.h.
46 {
48 }
static void init_options(boost::program_options::options_description &desc)
◆ run()
| void daemonize::t_rpc::run |
( |
| ) |
|
|
inline |
Definition at line 72 of file rpc.h.
73 {
74 MGINFO(
"Starting " << m_description <<
" RPC server...");
75 if (!m_server.run(2, false))
76 {
77 throw std::runtime_error("Failed to start " + m_description + " RPC server.");
78 }
79 MGINFO(m_description <<
" RPC server started ok");
80 }
◆ stop()
| void daemonize::t_rpc::stop |
( |
| ) |
|
|
inline |
Definition at line 82 of file rpc.h.
83 {
84 MGINFO(
"Stopping " << m_description <<
" RPC server...");
85 m_server.send_stop_signal();
86 m_server.timed_wait_server_stop(5000);
87 }
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/rpc.h