#include <zmq_server.h>
|
| static void | init_options (boost::program_options::options_description &desc) |
| |
Definition at line 45 of file zmq_server.h.
◆ ZmqServer()
| cryptonote::rpc::ZmqServer::ZmqServer |
( |
RpcHandler & |
h | ) |
|
Definition at line 48 of file zmq_server.cpp.
50 context(zmq_init(num_zmq_threads))
#define ELECTRONEUM_ZMQ_THROW(msg)
Throw an exception with a custom msg, current ZMQ error code, filename, and line number.
◆ ~ZmqServer()
| cryptonote::rpc::ZmqServer::~ZmqServer |
( |
| ) |
|
◆ addIPCSocket()
| bool cryptonote::rpc::ZmqServer::addIPCSocket |
( |
boost::string_ref |
address, |
|
|
boost::string_ref |
port |
|
) |
| |
◆ addTCPSocket()
| bool cryptonote::rpc::ZmqServer::addTCPSocket |
( |
boost::string_ref |
address, |
|
|
boost::string_ref |
port |
|
) |
| |
Definition at line 103 of file zmq_server.cpp.
107 MERROR(
"ZMQ RPC Server already shutdown");
111 rep_socket.reset(zmq_socket(context.get(), ZMQ_REP));
118 if (zmq_setsockopt(rep_socket.get(), ZMQ_MAXMSGSIZE, std::addressof(max_message_size),
sizeof(max_message_size)) != 0)
124 static constexpr
const int linger_value = std::chrono::milliseconds{linger_timeout}.count();
125 if (zmq_setsockopt(rep_socket.get(), ZMQ_LINGER, std::addressof(linger_value),
sizeof(linger_value)) != 0)
139 bind_address.append(
port.data(),
port.size());
141 if (zmq_bind(rep_socket.get(), bind_address.c_str()) < 0)
#define ELECTRONEUM_LOG_ZMQ_ERROR(...)
Print a message followed by the current ZMQ error message.
boost::endian::big_uint16_t port
◆ init_options()
| static void cryptonote::rpc::ZmqServer::init_options |
( |
boost::program_options::options_description & |
desc | ) |
|
|
static |
◆ run()
| void cryptonote::rpc::ZmqServer::run |
( |
| ) |
|
◆ serve()
| void cryptonote::rpc::ZmqServer::serve |
( |
| ) |
|
Definition at line 60 of file zmq_server.cpp.
68 MERROR(
"ZMQ RPC server reply socket is null");
82 catch (
const std::system_error& e)
85 MERROR(
"ZMQ RPC Server Error: " << e.what());
87 catch (
const std::exception& e)
89 MERROR(
"ZMQ RPC Server Error: " << e.what());
93 MERROR(
"Unknown error in ZMQ RPC server");
std::error_code make_error_code(int code) noexcept
virtual std::string handle(const std::string &request)=0
expect< std::string > receive(void *const socket, const int flags)
epee::misc_utils::struct_init< response_t > response
std::unique_ptr< void, close > socket
Unique ZMQ socket handle, calls zmq_close on destruction.
std::string message("Message requiring signing")
#define ELECTRONEUM_UNWRAP(...)
const T & move(const T &t)
expect< void > send(const epee::span< const std::uint8_t > payload, void *const socket, const int flags) noexcept
◆ stop()
| void cryptonote::rpc::ZmqServer::stop |
( |
| ) |
|
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/src/rpc/zmq_server.h
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/src/rpc/zmq_server.cpp