Skip to content

Commit 35d6bb5

Browse files
committed
Merge pull request #33 from cosmoharrigan/proxy
Add proxy_steerable interface for zmq_proxy_steerable in versions >= 4.0.4
2 parents 77b55a2 + 9683327 commit 35d6bb5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

zmq.hpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
#define ZMQ_NEW_MONITOR_EVENT_LAYOUT
6161
#endif
6262

63+
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 0, 4)
64+
#define ZMQ_HAS_PROXY_STEERABLE
65+
#endif
66+
6367
// In order to prevent unused variable warnings when building in non-debug
6468
// mode use this macro to make assertions.
6569
#ifndef NDEBUG
@@ -109,7 +113,16 @@ namespace zmq
109113
if (rc != 0)
110114
throw error_t ();
111115
}
112-
116+
117+
#ifdef ZMQ_HAS_PROXY_STEERABLE
118+
inline void proxy_steerable (void *frontend, void *backend, void *capture, void *control)
119+
{
120+
int rc = zmq_proxy_steerable (frontend, backend, capture, control);
121+
if (rc != 0)
122+
throw error_t ();
123+
}
124+
#endif
125+
113126
inline void version (int *major_, int *minor_, int *patch_)
114127
{
115128
zmq_version (major_, minor_, patch_);

0 commit comments

Comments
 (0)