Add proxy_steerable interface for zmq_proxy_steerable in versions >= 4.0.4

This commit is contained in:
Cosmo Harrigan 2014-03-17 18:20:51 -07:00
parent 77b55a27b0
commit 9683327efc

15
zmq.hpp
View File

@ -60,6 +60,10 @@
#define ZMQ_NEW_MONITOR_EVENT_LAYOUT
#endif
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 0, 4)
#define ZMQ_HAS_PROXY_STEERABLE
#endif
// In order to prevent unused variable warnings when building in non-debug
// mode use this macro to make assertions.
#ifndef NDEBUG
@ -109,7 +113,16 @@ namespace zmq
if (rc != 0)
throw error_t ();
}
#ifdef ZMQ_HAS_PROXY_STEERABLE
inline void proxy_steerable (void *frontend, void *backend, void *capture, void *control)
{
int rc = zmq_proxy_steerable (frontend, backend, capture, control);
if (rc != 0)
throw error_t ();
}
#endif
inline void version (int *major_, int *minor_, int *patch_)
{
zmq_version (major_, minor_, patch_);