Move Bind/Connect/Attach to FairMQChannel

This commit is contained in:
Alexey Rybalchenko
2018-11-05 15:11:41 +01:00
committed by Dennis Klein
parent 3ca0d7236a
commit 25fcf13985
20 changed files with 603 additions and 696 deletions

View File

@@ -91,19 +91,21 @@ bool FairMQSocketZMQ::Bind(const string& address)
LOG(error) << "Failed binding socket " << fId << ", reason: " << zmq_strerror(errno);
return false;
}
return true;
}
void FairMQSocketZMQ::Connect(const string& address)
bool FairMQSocketZMQ::Connect(const string& address)
{
// LOG(info) << "connect socket " << fId << " on " << address;
if (zmq_connect(fSocket, address.c_str()) != 0)
{
LOG(error) << "Failed connecting socket " << fId << ", reason: " << zmq_strerror(errno);
// error here means incorrect configuration. exit if it happens.
exit(EXIT_FAILURE);
return false;
}
return true;
}
int FairMQSocketZMQ::Send(FairMQMessagePtr& msg, const int timeout)