#ifndef OPTIONS_H #define OPTIONS_H #include namespace ZeroMQ { enum class SocketType : int { Req = ZMQ_REQ, Rep = ZMQ_REP, Dealer = ZMQ_DEALER, Router = ZMQ_ROUTER, Pub = ZMQ_PUB, Sub = ZMQ_SUB, Xpub = ZMQ_XPUB, Xsub = ZMQ_XSUB, Push = ZMQ_PUSH, Pull = ZMQ_PULL, Stream = ZMQ_STREAM, Pair = ZMQ_PAIR }; enum class SendFlags : int { None = 0, Dontwait = ZMQ_DONTWAIT, Sndmore = ZMQ_SNDMORE, }; enum class RecvFlags : int { None = 0, Dontwait = ZMQ_DONTWAIT, }; // BoolUnit: if true accepts values of type bool (but passed as T into libzmq) template struct IntegralOption {}; // NullTerm: // 0: binary data // 1: null-terminated string (`getsockopt` size includes null) // 2: binary (size 32) or Z85 encoder string of size 41 (null included) template struct ArrayOption {}; // ZMQ_DEFINE_INTEGRAL_OPT(ZMQ_LINGER, linger, int); using LingerType = IntegralOption; inline constexpr LingerType Linger; // ZMQ_DEFINE_INTEGRAL_OPT(ZMQ_RCVHWM, rcvhwm, int); using ReceiveHighWaterMarkType = IntegralOption; inline constexpr ReceiveHighWaterMarkType ReceiveHighWaterMark; // ZMQ_DEFINE_INTEGRAL_OPT(ZMQ_EVENTS, events, int); using EventsType = IntegralOption; inline constexpr EventsType Events; // ZMQ_DEFINE_INTEGRAL_BOOL_UNIT_OPT(ZMQ_RCVMORE, rcvmore, int); using ReceiveMoreType = IntegralOption; inline constexpr ReceiveMoreType ReceiveMore; // ZMQ_DEFINE_ARRAY_OPT(ZMQ_SUBSCRIBE, subscribe); using SubscribeType = ArrayOption; inline constexpr SubscribeType Subscribe; } // namespace ZeroMQ #endif // OPTIONS_H