mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Dep/zmqpp: Build fix for ZMQ version 2.2.0
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <cassert>
|
||||
|
||||
#include <zmq.h>
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user