![]() |
Mads
Multi-Agent Distributed System
|
Opt-in zmqpp-shaped API over cppzmq, for downstream code only.
More...
#include <cstring>#include <string>#include <utility>#include <zmq.hpp>#include <zmq_addon.hpp>#include "zap_auth.hpp"Go to the source code of this file.
Namespaces | |
| namespace | zmqpp |
| Minimal stand-in for the parts of zmqpp that MADS used to expose. | |
| namespace | zmqpp::socket_option |
Socket option names, mapped onto the type-checked zmq::sockopt. | |
| namespace | zmqpp::curve |
zmqpp-shaped context: a zmq::context_t plus terminate(). | |
Macros | |
| #define | MADS_ZMQPP_DEPRECATED(msg) [[deprecated(msg)]] |
Typedefs | |
| using | zmqpp::socket_type = zmq::socket_type |
Socket types, spelled as in zmqpp (socket_type::pub, ...). | |
| using | zmqpp::exception = zmq::error_t |
| zmqpp's single exception type maps onto cppzmq's. | |
| using | zmqpp::zmq_internal_exception = zmq::error_t |
| zmqpp raised this for libzmq-level failures; cppzmq has one type. | |
| using | zmqpp::curve::keypair = Mads::CurveKeypair |
| zmqpp's keypair struct; the fields keep their names. | |
Functions | |
| keypair | zmqpp::curve::generate_keypair () |
| Generate a CURVE keypair. | |
Variables | |
| constexpr auto | zmqpp::socket_option::linger = zmq::sockopt::linger |
| constexpr auto | zmqpp::socket_option::receive_timeout = zmq::sockopt::rcvtimeo |
| constexpr auto | zmqpp::socket_option::send_timeout = zmq::sockopt::sndtimeo |
| constexpr auto | zmqpp::socket_option::conflate = zmq::sockopt::conflate |
| constexpr auto | zmqpp::socket_option::receive_high_water_mark = zmq::sockopt::rcvhwm |
| constexpr auto | zmqpp::socket_option::send_high_water_mark = zmq::sockopt::sndhwm |
| constexpr auto | zmqpp::socket_option::identity = zmq::sockopt::routing_id |
| constexpr auto | zmqpp::socket_option::curve_server = zmq::sockopt::curve_server |
| constexpr auto | zmqpp::socket_option::curve_public_key = zmq::sockopt::curve_publickey |
| constexpr auto | zmqpp::socket_option::curve_secret_key = zmq::sockopt::curve_secretkey |
| constexpr auto | zmqpp::socket_option::curve_server_key = zmq::sockopt::curve_serverkey |
Opt-in zmqpp-shaped API over cppzmq, for downstream code only.
MADS used to expose zmqpp types on Mads::Agent's protected interface (_context, _publisher, _subscriber, receive_raw()) and pulled <zmqpp/zmqpp.hpp> in transitively through agent.hpp. Since the cppzmq migration those members are zmq::context_t / zmq::socket_t / zmq::multipart_t and no MADS header includes zmqpp at all.
A downstream agent that only calls the public API (publish(), receive(), loop(), settings, callbacks) — and every consumer of Mads::AgentApp, whose interface never named a ZMQ type — needs nothing from this header. It exists for the narrower case of a subclass that touches the sockets directly, e.g.
The types here derive from their cppzmq counterparts rather than wrapping them, so a zmqpp::socket still binds to a zmq::socket_t& parameter (Mads::CurveAuth::setup_curve_client(), for one) and the Agent members bind to zmqpp::socket& parameters in downstream code.
MadsCore is a shared library whose class layout changed, so downstream code must be recompiled regardless.Define MADS_NO_ZMQPP_COMPAT_WARNING before including to silence the deprecation warnings while porting.
Definition in file zmqpp_compat.hpp.
| #define MADS_ZMQPP_DEPRECATED | ( | msg | ) | [[deprecated(msg)]] |
Definition at line 81 of file zmqpp_compat.hpp.