mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
FairMQSocket: add versions of Send/Receive methods with int flags instead of string, which is more flexible and performant.
Int flags are mapped to their ZeroMQ/nanomsg versions behind the transport interface. Methods with string flags are kept for backwards compatibility.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
a9b7e8866c
commit
6518b7cd41
@@ -23,13 +23,25 @@ using namespace std;
|
||||
class FairMQSocket
|
||||
{
|
||||
public:
|
||||
const int SNDMORE;
|
||||
const int RCVMORE;
|
||||
const int NOBLOCK;
|
||||
|
||||
FairMQSocket(int sndMore, int rcvMore, int noBlock)
|
||||
: SNDMORE(sndMore)
|
||||
, RCVMORE(rcvMore)
|
||||
, NOBLOCK(noBlock)
|
||||
{}
|
||||
|
||||
virtual string GetId() = 0;
|
||||
|
||||
virtual void Bind(const string& address) = 0;
|
||||
virtual void Connect(const string& address) = 0;
|
||||
|
||||
virtual int Send(FairMQMessage* msg, const string& flag="") = 0;
|
||||
virtual int Send(FairMQMessage* msg, const int flags) = 0;
|
||||
virtual int Receive(FairMQMessage* msg, const string& flag="") = 0;
|
||||
virtual int Receive(FairMQMessage* msg, const int flags) = 0;
|
||||
|
||||
virtual void* GetSocket() = 0;
|
||||
virtual int GetSocket(int nothing) = 0;
|
||||
|
Reference in New Issue
Block a user