mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Add orthogonal OK/ERROR states.
Replace state check mutex with atomic. Update DDS example documentation.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
a7ab33a10e
commit
fbf7dbf2ba
@@ -42,19 +42,17 @@ void FairMQExample5Client::Run()
|
||||
|
||||
string* text = new string(fText);
|
||||
|
||||
FairMQMessage* request = fTransportFactory->CreateMessage(const_cast<char*>(text->c_str()), text->length(), CustomCleanup, text);
|
||||
FairMQMessage* reply = fTransportFactory->CreateMessage();
|
||||
unique_ptr<FairMQMessage> request(fTransportFactory->CreateMessage(const_cast<char*>(text->c_str()), text->length(), CustomCleanup, text));
|
||||
unique_ptr<FairMQMessage> reply(fTransportFactory->CreateMessage());
|
||||
|
||||
LOG(INFO) << "Sending \"" << fText << "\" to server.";
|
||||
|
||||
if (fChannels.at("data").at(0).Send(request) > 0)
|
||||
{
|
||||
fChannels.at("data").at(0).Receive(reply);
|
||||
LOG(INFO) << "Received reply from server: \"" << string(static_cast<char*>(reply->GetData()), reply->GetSize()) << "\"";
|
||||
}
|
||||
|
||||
LOG(INFO) << "Received reply from server: \"" << string(static_cast<char*>(reply->GetData()), reply->GetSize()) << "\"";
|
||||
|
||||
delete reply;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user