Merge pull request #33 from cosmoharrigan/proxy

Add proxy_steerable interface for zmq_proxy_steerable in versions >= 4.0.4
This commit is contained in:
Pieter Hintjens 2014-03-18 07:10:29 +01:00
commit 35d6bb5128

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_);