|
Electroneum
|
Classes | |
| struct | close |
Calls zmq_close More... | |
| class | terminate |
Calls zmq_term More... | |
Typedefs | |
| using | context = std::unique_ptr< void, terminate > |
Unique ZMQ context handle, calls zmq_term on destruction. More... | |
| using | socket = std::unique_ptr< void, close > |
Unique ZMQ socket handle, calls zmq_close on destruction. More... | |
Functions | |
| const std::error_category & | error_category () noexcept |
| expect< std::string > | receive (void *const socket, const int flags) |
| expect< void > | send (const epee::span< const std::uint8_t > payload, void *const socket, const int flags) noexcept |
| std::error_code | make_error_code (int code) noexcept |
| std::error_code | get_error_code () noexcept |
| using net::zmq::context = typedef std::unique_ptr<void, terminate> |
| using net::zmq::socket = typedef std::unique_ptr<void, close> |
|
noexcept |
|
inlinenoexcept |
zmq_errno() using net::zmq::error_category(). Definition at line 70 of file zmq.h.

|
inlinenoexcept |
code (usally from zmq_errno()) usingnet::zmq::error_category()`. Definition at line 64 of file zmq.h.


| expect< std::string > net::zmq::receive | ( | void * | socket, |
| int | flags = 0 |
||
| ) |
Read all parts of the next message on socket. Blocks until the entire next message (all parts) are read, or until zmq_term is called on the zmq_context associated with socket. If the context is terminated, make_error_code(ETERM) is returned.
EINTR, so exiting on interrupts requires context termination. socket or by flags, then net::zmq::make_error_code(EAGAIN) will be returned if this would block. | socket | Handle created with zmq_socket. |
| flags | See zmq_msg_read for possible flags. |
socket or ZMQ error. Definition at line 175 of file zmq.cpp.


|
noexcept |
Sends payload on socket. Blocks until the entire message is queued for sending, or until zmq_term is called on the zmq_context associated with socket. If the context is terminated, make_error_code(ETERM) is returned.
EINTR, so exiting on interrupts requires context termination. socket or by flags, then net::zmq::make_error_code(EAGAIN) will be returned if this would block. | payload | sent as one message on socket. |
| socket | Handle created with zmq_socket. |
| flags | See zmq_send for possible flags. |
success() if sent, otherwise ZMQ error. Definition at line 182 of file zmq.cpp.
