mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
To use protobuf, run cmake as follows: cmake -DUSE_PROTOBUF=1 .. For this, protobuf library has to be installed on the system. Further changes: Clean up splitter/merger: default are N-to-1-merger and 1-to-N-splitter. Fix bug in nanomsg message deallocation. Setup proper buffer sizes for nanomsg/zeromq via cmake/bash script. chmod +x for start scripts.
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
/**
|
|
* FairMQSocketNN.h
|
|
*
|
|
* @since 2013-12-05
|
|
* @author A. Rybalchenko
|
|
*/
|
|
|
|
#ifndef FAIRMQSOCKETNN_H_
|
|
#define FAIRMQSOCKETNN_H_
|
|
|
|
#include <nanomsg/nn.h>
|
|
#include <nanomsg/pipeline.h>
|
|
#include <nanomsg/pubsub.h>
|
|
|
|
#include "FairMQSocket.h"
|
|
|
|
|
|
class FairMQSocketNN : public FairMQSocket
|
|
{
|
|
public:
|
|
FairMQSocketNN(const string& type, int num);
|
|
|
|
virtual string GetId();
|
|
|
|
virtual void Bind(const string& address);
|
|
virtual void Connect(const string& address);
|
|
|
|
virtual size_t Send(FairMQMessage* msg);
|
|
virtual size_t Receive(FairMQMessage* msg);
|
|
|
|
virtual void* GetSocket();
|
|
virtual int GetSocket(int nothing);
|
|
virtual void Close();
|
|
|
|
virtual void SetOption(const string& option, const void* value, size_t valueSize);
|
|
|
|
unsigned long GetBytesTx();
|
|
unsigned long GetBytesRx();
|
|
unsigned long GetMessagesTx();
|
|
unsigned long GetMessagesRx();
|
|
|
|
static int GetConstant(const string& constant);
|
|
|
|
virtual ~FairMQSocketNN();
|
|
|
|
private:
|
|
int fSocket;
|
|
string fId;
|
|
unsigned long fBytesTx;
|
|
unsigned long fBytesRx;
|
|
unsigned long fMessagesTx;
|
|
unsigned long fMessagesRx;
|
|
};
|
|
|
|
#endif /* FAIRMQSOCKETNN_H_ */
|