31 #include <system_error> 38 #define ELECTRONEUM_ZMQ_CHECK(...) \ 41 if (( __VA_ARGS__ ) < 0) \ 42 return {::net::zmq::get_error_code()}; \ 46 #define ELECTRONEUM_LOG_ZMQ_ERROR(...) \ 49 MERROR( __VA_ARGS__ << ": " << ::net::zmq::get_error_code().message()); \ 53 #define ELECTRONEUM_ZMQ_THROW(msg) \ 54 ELECTRONEUM_THROW( ::net::zmq::get_error_code(), msg ) 78 static void call(
void* ptr) noexcept;
98 using context = std::unique_ptr<void, terminate>;
101 using socket = std::unique_ptr<void, close>;
std::error_category const & error_category() noexcept
std::error_code make_error_code(int code) noexcept
void operator()(void *ptr) const noexcept
expect< std::string > receive(void *const socket, const int flags)
const std::error_category & error_category() noexcept
std::unique_ptr< void, close > socket
Unique ZMQ socket handle, calls zmq_close on destruction.
std::unique_ptr< void, terminate > context
Unique ZMQ context handle, calls zmq_term on destruction.
void operator()(void *ptr) const noexcept
expect< void > send(const epee::span< const std::uint8_t > payload, void *const socket, const int flags) noexcept
std::error_code get_error_code() noexcept