mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-04-26 01:36:21 +02:00
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:
commit
35d6bb5128
13
zmq.hpp
13
zmq.hpp
@ -60,6 +60,10 @@
|
|||||||
#define ZMQ_NEW_MONITOR_EVENT_LAYOUT
|
#define ZMQ_NEW_MONITOR_EVENT_LAYOUT
|
||||||
#endif
|
#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
|
// In order to prevent unused variable warnings when building in non-debug
|
||||||
// mode use this macro to make assertions.
|
// mode use this macro to make assertions.
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
@ -110,6 +114,15 @@ namespace zmq
|
|||||||
throw error_t ();
|
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_)
|
inline void version (int *major_, int *minor_, int *patch_)
|
||||||
{
|
{
|
||||||
zmq_version (major_, minor_, patch_);
|
zmq_version (major_, minor_, patch_);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user