Dep/zmqpp: Build fix for ZMQ version 2.2.0

This commit is contained in:
Shauren
2014-10-17 23:40:17 +02:00
parent f773a9e053
commit efcde65cf2
2 changed files with 5 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
#include <unordered_map>
#include <vector>
#include <utility>
#include <cassert>
#include <zmq.h>

View File

@@ -74,12 +74,14 @@ void socket::bind(endpoint_t const& endpoint)
void socket::unbind(endpoint_t const& endpoint)
{
#if (ZMQ_VERSION_MAJOR > 3 || (ZMQ_VERSION_MAJOR == 3 && ZMQ_VERSION_MINOR >= 2))
int result = zmq_unbind(_socket, endpoint.c_str());
if (0 != result)
{
throw zmq_internal_exception();
}
#endif
}
void socket::connect(endpoint_t const& endpoint)
@@ -94,12 +96,14 @@ void socket::connect(endpoint_t const& endpoint)
void socket::disconnect(endpoint_t const& endpoint)
{
#if (ZMQ_VERSION_MAJOR > 3 || (ZMQ_VERSION_MAJOR == 3 && ZMQ_VERSION_MINOR >= 2))
int result = zmq_disconnect(_socket, endpoint.c_str());
if (0 != result)
{
throw zmq_internal_exception();
}
#endif
}
void socket::close()