mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 01:51:45 +00:00
Move Bind/Connect/Attach to FairMQChannel
This commit is contained in:
committed by
Dennis Klein
parent
3ca0d7236a
commit
25fcf13985
@@ -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)
|
||||
|
@@ -26,7 +26,7 @@ class FairMQSocketZMQ final : public FairMQSocket
|
||||
std::string GetId() override;
|
||||
|
||||
bool Bind(const std::string& address) override;
|
||||
void Connect(const std::string& address) override;
|
||||
bool Connect(const std::string& address) override;
|
||||
|
||||
int Send(FairMQMessagePtr& msg, const int timeout = -1) override;
|
||||
int Receive(FairMQMessagePtr& msg, const int timeout = -1) override;
|
||||
|
Reference in New Issue
Block a user