Implement nanomsg linger in our transport

This commit is contained in:
Alexey Rybalchenko
2018-10-12 17:10:14 +02:00
committed by Dennis Klein
parent cfb727181f
commit 44acd4997d
16 changed files with 116 additions and 14 deletions

View File

@@ -164,12 +164,11 @@ int FairMQSocketZMQ::SendImpl(FairMQMessagePtr& msg, const int flags, const int
int FairMQSocketZMQ::ReceiveImpl(FairMQMessagePtr& msg, const int flags, const int timeout)
{
int nbytes = -1;
int elapsed = 0;
while (true)
{
nbytes = zmq_msg_recv(static_cast<FairMQMessageZMQ*>(msg.get())->GetMessage(), fSocket, flags);
int nbytes = zmq_msg_recv(static_cast<FairMQMessageZMQ*>(msg.get())->GetMessage(), fSocket, flags);
if (nbytes >= 0)
{
fBytesRx += nbytes;