Set pointer to factory also when receiving multi-part

This commit is contained in:
mkrzewic
2018-11-27 13:23:42 +01:00
committed by Alexey Rybalchenko
parent 25fcf13985
commit cc0c525e0d
18 changed files with 45 additions and 29 deletions

View File

@@ -31,8 +31,9 @@ namespace ofi
using namespace std;
Socket::Socket(Context& context, const string& type, const string& name, const string& id /*= ""*/)
: fDataEndpoint(nullptr)
Socket::Socket(Context& context, const string& type, const string& name, const string& id /*= ""*/, FairMQTransportFactory* fac)
: FairMQSocket{fac}
, fDataEndpoint(nullptr)
, fDataCompletionQueueTx(nullptr)
, fDataCompletionQueueRx(nullptr)
, fId(id + "." + name + "." + type)
@@ -515,7 +516,7 @@ auto Socket::ReceiveImpl(vector<FairMQMessagePtr>& msgVec, const int flags, cons
//
// do
// {
// FairMQMessagePtr part(new FairMQMessageSHM(fManager));
// FairMQMessagePtr part(new FairMQMessageSHM(fManager, GetTransport()));
// zmq_msg_t* msgPtr = static_cast<FairMQMessageSHM*>(part.get())->GetMessage();
//
// int nbytes = zmq_msg_recv(msgPtr, fSocket, flags);