mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
FairMQ: Parameterize the command interface initializing with sub socket
! THIS PATCH BREAKS NANOMSG TRANSPORT ! The subscriber command socket was created using the transport factory of the channel which might not implement sub sockets. This patch creates the subscriber command sockets in the device initialization and passes them down (move) to the command interface initialization. This patch puts more focus on the GetSocket interface of FairMQSocket, because all command sockets are now implemented with the default transport - the channels use an internal poller which polls over sockets of potentially different transports now (e.g. zeromq command socket and nanomsg data socket). Basically, all transports need to return file descriptors compatible to be used in a single poll set. THIS IS NOT THE CASE! ! THIS PATCH BREAKS NANOMSG TRANSPORT !
This commit is contained in:
committed by
Mohammad Al-Turany
parent
43a06e3cc7
commit
e73fcbd595
@@ -660,9 +660,9 @@ void FairMQChannel::InitTransport(shared_ptr<FairMQTransportFactory> factory)
|
||||
fTransportType = factory->GetType();
|
||||
}
|
||||
|
||||
bool FairMQChannel::InitCommandInterface()
|
||||
bool FairMQChannel::InitCommandInterface(FairMQSocketPtr channelCmdSocket)
|
||||
{
|
||||
fChannelCmdSocket = fTransportFactory->CreateSocket("sub", "device-commands");
|
||||
fChannelCmdSocket = std::move(channelCmdSocket);
|
||||
if (fChannelCmdSocket)
|
||||
{
|
||||
fChannelCmdSocket->Connect("inproc://commands");
|
||||
|
Reference in New Issue
Block a user