diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-01-15 07:09:03 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-01-18 13:22:09 +0100 |
commit | 12670a017ddb14fbf4a932799051dcfe21dd6c78 (patch) | |
tree | 43675f68329676a1ff84f8a26bab8733be224c0b /src/input/Zmq.cpp | |
parent | c1d33594ca424b56a34200a6e525cdb1317bad69 (diff) | |
download | dabmux-12670a017ddb14fbf4a932799051dcfe21dd6c78.tar.gz dabmux-12670a017ddb14fbf4a932799051dcfe21dd6c78.tar.bz2 dabmux-12670a017ddb14fbf4a932799051dcfe21dd6c78.zip |
Common 6b5db53: Update zmq.hpp, TCPReceiveServer, EDI decoder and output
Diffstat (limited to 'src/input/Zmq.cpp')
-rw-r--r-- | src/input/Zmq.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input/Zmq.cpp b/src/input/Zmq.cpp index 305653b..be3fd1f 100644 --- a/src/input/Zmq.cpp +++ b/src/input/Zmq.cpp @@ -51,6 +51,7 @@ #include <limits.h> #include "PcDebug.h" #include "Log.h" +#include "zmq.hpp" #ifdef __MINGW32__ # define bzero(s, n) memset(s, 0, n) @@ -348,7 +349,8 @@ int ZmqMPEG::readFromSocket(size_t framesize) zmq::message_t msg; try { - messageReceived = m_zmq_sock.recv(&msg, ZMQ_DONTWAIT); + auto result = m_zmq_sock.recv(msg, zmq::recv_flags::dontwait); + messageReceived = result.has_value(); if (not messageReceived) { return 0; } @@ -417,7 +419,8 @@ int ZmqAAC::readFromSocket(size_t framesize) zmq::message_t msg; try { - messageReceived = m_zmq_sock.recv(&msg, ZMQ_DONTWAIT); + auto result = m_zmq_sock.recv(msg, zmq::recv_flags::dontwait); + messageReceived = result.has_value(); if (not messageReceived) { return 0; } @@ -615,4 +618,3 @@ const string ZmqBase::get_parameter(const string& parameter) const } }; - |