mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
Compatibility with nanomsg<=0.6
This commit is contained in:
parent
3c73c690f7
commit
341464a793
|
@ -138,7 +138,11 @@ int FairMQSocketNN::Send(FairMQMessagePtr& msg, const int flags)
|
||||||
|
|
||||||
return nbytes;
|
return nbytes;
|
||||||
}
|
}
|
||||||
|
#if NN_VERSION_CURRENT>2 // backwards-compatibility with nanomsg version<=0.6
|
||||||
else if (nn_errno() == ETIMEDOUT)
|
else if (nn_errno() == ETIMEDOUT)
|
||||||
|
#else
|
||||||
|
else if (nn_errno() == EAGAIN)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
||||||
{
|
{
|
||||||
|
@ -182,7 +186,11 @@ int FairMQSocketNN::Receive(FairMQMessagePtr& msg, const int flags)
|
||||||
static_cast<FairMQMessageNN*>(msg.get())->fReceiving = true;
|
static_cast<FairMQMessageNN*>(msg.get())->fReceiving = true;
|
||||||
return nbytes;
|
return nbytes;
|
||||||
}
|
}
|
||||||
|
#if NN_VERSION_CURRENT>2 // backwards-compatibility with nanomsg version<=0.6
|
||||||
else if (nn_errno() == ETIMEDOUT)
|
else if (nn_errno() == ETIMEDOUT)
|
||||||
|
#else
|
||||||
|
else if (nn_errno() == EAGAIN)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
||||||
{
|
{
|
||||||
|
@ -239,7 +247,11 @@ int64_t FairMQSocketNN::Send(vector<unique_ptr<FairMQMessage>>& msgVec, const in
|
||||||
++fMessagesTx;
|
++fMessagesTx;
|
||||||
return nbytes;
|
return nbytes;
|
||||||
}
|
}
|
||||||
|
#if NN_VERSION_CURRENT>2 // backwards-compatibility with nanomsg version<=0.6
|
||||||
else if (nn_errno() == ETIMEDOUT)
|
else if (nn_errno() == ETIMEDOUT)
|
||||||
|
#else
|
||||||
|
else if (nn_errno() == EAGAIN)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
||||||
{
|
{
|
||||||
|
@ -317,7 +329,11 @@ int64_t FairMQSocketNN::Receive(vector<unique_ptr<FairMQMessage>>& msgVec, const
|
||||||
nn_freemsg(ptr);
|
nn_freemsg(ptr);
|
||||||
return nbytes;
|
return nbytes;
|
||||||
}
|
}
|
||||||
|
#if NN_VERSION_CURRENT>2 // backwards-compatibility with nanomsg version<=0.6
|
||||||
else if (nn_errno() == ETIMEDOUT)
|
else if (nn_errno() == ETIMEDOUT)
|
||||||
|
#else
|
||||||
|
else if (nn_errno() == EAGAIN)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
if (!fInterrupted && ((flags & NN_DONTWAIT) == 0))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user