mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Update multi-part features (nanomsg) and various fixes
- Implement nanomsg multipart with MessagePack. - Use the MessagePack from FairSoft and handle not found case. - Update splitter, merger and proxy devices to handle multi-part. - Let FairMQParts.At() return pointer reference (can be used for moving). - Add missing const specifier in the message interface. - Add transmit kernel size setting to channels (ZMQ_SNDBUF). - Remove FairMQBuffer device. - Remove old multi-part methods from Tutorial3 example (to be replaced with Parts API). - Make callback mandatory for newMsg(data, size, callback). - Add missing <vector> include in FairMQSocket.
This commit is contained in:
@@ -28,17 +28,22 @@ FairMQProxy::~FairMQProxy()
|
||||
|
||||
void FairMQProxy::Run()
|
||||
{
|
||||
std::unique_ptr<FairMQMessage> msg(fTransportFactory->CreateMessage());
|
||||
|
||||
// store the channel references to avoid traversing the map on every loop iteration
|
||||
const FairMQChannel& dataInChannel = fChannels.at("data-in").at(0);
|
||||
const FairMQChannel& dataOutChannel = fChannels.at("data-out").at(0);
|
||||
|
||||
while (CheckCurrentState(RUNNING))
|
||||
{
|
||||
if (dataInChannel.Receive(msg) > 0)
|
||||
FairMQParts parts;
|
||||
|
||||
if (Receive(parts, "data-in") >= 0)
|
||||
{
|
||||
dataOutChannel.Send(msg);
|
||||
if (Send(parts, "data-out") < 0)
|
||||
{
|
||||
LOG(DEBUG) << "Transfer interrupted";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(DEBUG) << "Transfer interrupted";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user