FairMQ/fairmq/zeromq/FairMQPollerZMQ.h
Alexey Rybalchenko 0a610926a1 - Proper process termination:
if interrupted with CTRL+C blocking socket calls will return with -1. Each device should call FairMQDevice::Shutdown() before ending the running state to close open sockets, otherwise the interrupt call itself will block.

- FIX: Update number of received messages for FairMQFileSink.
- Add ability to poll on outputs for FairMQPoller.
2014-08-20 13:48:51 +02:00

41 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" *
********************************************************************************/
/**
* FairMQPollerZMQ.h
*
* @since 2014-01-23
* @author A. Rybalchenko
*/
#ifndef FAIRMQPOLLERZMQ_H_
#define FAIRMQPOLLERZMQ_H_
#include <vector>
#include "FairMQPoller.h"
#include "FairMQSocket.h"
using std::vector;
class FairMQPollerZMQ : public FairMQPoller
{
public:
FairMQPollerZMQ(const vector<FairMQSocket*>& inputs);
virtual void Poll(int timeout);
virtual bool CheckInput(int index);
virtual bool CheckOutput(int index);
virtual ~FairMQPollerZMQ();
private:
zmq_pollitem_t* items;
int fNumItems;
};
#endif /* FAIRMQPOLLERZMQ_H_ */