a little clean up

This commit is contained in:
Alexey Rybalchenko
2014-01-17 12:34:57 +01:00
parent 31d10170f7
commit 3803a3d155
43 changed files with 525 additions and 513 deletions

View File

@@ -1,12 +1,10 @@
/*
/**
* FairMQProxy.cxx
*
* Created on: Oct 2, 2013
* Author: A. Rybalchenko
* @since 2013-10-02
* @author A. Rybalchenko
*/
#include <iostream>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
@@ -27,15 +25,13 @@ void FairMQProxy::Run()
boost::thread rateLogger(boost::bind(&FairMQDevice::LogSocketRates, this));
//TODO: check rateLogger output
int rc = zmq_proxy(*(fPayloadInputs->at(0)->GetSocket()), *(fPayloadOutputs->at(0)->GetSocket()), NULL);
if (rc == -1) {
std::cout << "Error: proxy failed: " << strerror(errno) << std::endl;
}
FairMQMessage msg;
//TODO: make proxy bind on both ends.
while ( fState == RUNNING ) {
fPayloadInputs->at(0)->Receive(&msg);
fPayloadOutputs->at(0)->Send(&msg);
}
rateLogger.interrupt();
rateLogger.join();
}