FairMQ/fairmq/test/req-rep/FairMQTestReq.cxx
Alexey Rybalchenko c42b6ca4ae Include device ID in the zeromq socket identity.
For request sockets in ZeroMQ the socket identity must be unique, otherwise multiple clients will be rejected.
Update the tests to test this use case.
2016-03-03 13:10:56 +01:00

39 lines
1.1 KiB
C++

/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
/**
* FairMQTestReq.cxx
*
* @since 2015-09-05
* @author A. Rybalchenko
*/
#include <memory> // unique_ptr
#include "FairMQTestReq.h"
#include "FairMQLogger.h"
FairMQTestReq::FairMQTestReq()
{
}
void FairMQTestReq::Run()
{
std::unique_ptr<FairMQMessage> request(NewMessage());
Send(request, "data");
std::unique_ptr<FairMQMessage> reply(NewMessage());
if (Receive(reply, "data") >= 0)
{
LOG(INFO) << "received reply";
}
}
FairMQTestReq::~FairMQTestReq()
{
}