FairMQ/fairmq/FairMQSocket.h
Alexey Rybalchenko 8cd120aef4 - Add multipart support to the interface and enable its use out of tasks.
Examples on the use out of tasks are provided in:
  `example/Tutorial3/digitization/TestDetectorDigiLoader.tpl:76-85`: sending a part.
  `example/Tutorial3/reconstruction/FairTestDetectorMQRecoTask.tpl:177-182`: receiving a part.

- This commit also makes structure within processorTask more consistent with samplerTask.

- add macro MQLOG to FairMQLogger.
2014-08-08 14:52:31 +02:00

51 lines
1.6 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" *
********************************************************************************/
/**
* FairMQSocket.h
*
* @since 2012-12-05
* @author D. Klein, A. Rybalchenko
*/
#ifndef FAIRMQSOCKET_H_
#define FAIRMQSOCKET_H_
#include <string>
#include "FairMQMessage.h"
using std::string;
using std::stringstream;
class FairMQSocket
{
public:
virtual string GetId() = 0;
virtual void Bind(const string& address) = 0;
virtual void Connect(const string& address) = 0;
virtual size_t Send(FairMQMessage* msg, const string& flag="") = 0;
virtual size_t Receive(FairMQMessage* msg, const string& flag="") = 0;
virtual void* GetSocket() = 0;
virtual int GetSocket(int nothing) = 0;
virtual void Close() = 0;
virtual void SetOption(const string& option, const void* value, size_t valueSize) = 0;
virtual void GetOption(const string& option, void* value, size_t* valueSize) = 0;
virtual unsigned long GetBytesTx() = 0;
virtual unsigned long GetBytesRx() = 0;
virtual unsigned long GetMessagesTx() = 0;
virtual unsigned long GetMessagesRx() = 0;
virtual ~FairMQSocket() {};
};
#endif /* FAIRMQSOCKET_H_ */