mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-14 00:56:47 +00:00
Always build multipart support in nanomsg transport
This commit is contained in:
parent
219487d489
commit
ff9618765f
|
@ -24,9 +24,7 @@
|
||||||
#include <nanomsg/pair.h>
|
#include <nanomsg/pair.h>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifdef MSGPACK_FOUND
|
|
||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
#endif /*MSGPACK_FOUND*/
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -259,7 +257,6 @@ int FairMQSocketNN::ReceiveImpl(FairMQMessagePtr& msg, const int flags, const in
|
||||||
int64_t FairMQSocketNN::SendImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int timeout)
|
int64_t FairMQSocketNN::SendImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int timeout)
|
||||||
{
|
{
|
||||||
const unsigned int vecSize = msgVec.size();
|
const unsigned int vecSize = msgVec.size();
|
||||||
#ifdef MSGPACK_FOUND
|
|
||||||
int elapsed = 0;
|
int elapsed = 0;
|
||||||
|
|
||||||
// create msgpack simple buffer
|
// create msgpack simple buffer
|
||||||
|
@ -331,15 +328,10 @@ int64_t FairMQSocketNN::SendImpl(vector<FairMQMessagePtr>& msgVec, const int fla
|
||||||
return nbytes;
|
return nbytes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /*MSGPACK_FOUND*/
|
|
||||||
LOG(error) << "Cannot send message from vector of size " << vecSize << " and flags " << flags << " with nanomsg multipart because MessagePack is not available.";
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
#endif /*MSGPACK_FOUND*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t FairMQSocketNN::ReceiveImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int timeout)
|
int64_t FairMQSocketNN::ReceiveImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int timeout)
|
||||||
{
|
{
|
||||||
#ifdef MSGPACK_FOUND
|
|
||||||
// Warn if the vector is filled before Receive() and empty it.
|
// Warn if the vector is filled before Receive() and empty it.
|
||||||
// if (msgVec.size() > 0)
|
// if (msgVec.size() > 0)
|
||||||
// {
|
// {
|
||||||
|
@ -423,10 +415,6 @@ int64_t FairMQSocketNN::ReceiveImpl(vector<FairMQMessagePtr>& msgVec, const int
|
||||||
return nbytes;
|
return nbytes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /*MSGPACK_FOUND*/
|
|
||||||
LOG(error) << "Cannot receive message into vector of size " << msgVec.size() << " and flags " << flags << " with nanomsg multipart because MessagePack is not available.";
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
#endif /*MSGPACK_FOUND*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FairMQSocketNN::Close()
|
void FairMQSocketNN::Close()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user