InterprocessConnection unable to send/receive messages between plugins

I have implemented an InterprocessConnection on a component that provides control for presets. I needed the component to broadcast a message to other plugin instances that a new preset had been added, so that they can update a combobox list of presets. This would ensure that the normalised index of the preset selected will be correct when the plugin instances are loaded again.

The problem is that my InterprocessConnection, initially calls connectionMade on connectToPipe, but then does not return true it seems as connectionLost is then called.

I’m not sure what I am doing wrong here. Both plugins are the same type and the code I am using is:

createPipe("MREVMIXPRESETS", -1);

if(connectToPipe("MREVMIXPRESETS", -1))
{
    DBG("Connected");
    const String text("Test_IPC");
    MemoryBlock messageData (text.toUTF8(), text.getNumBytesAsUTF8());
    sendMessage(messageData);
}
else
{
    DBG("Not connected");
}

I am creating the connection using:

InterprocessConnection(true, 88)

So, I figured out that creatPipe connects to the pipe so there is no need to call connectToPipe unless the connection is not connected.

However, when I sendMessage, the DAW hangs. I am debugging in Logic Pro X

Try InterprocessConnection(false, 88) to use a separate thread for the callback.

I found NamedPipe cumbersome, but using TCP sockets worked for me without any problem.
I think pipes work only for 1:1 relationships?

Hi @siedschl , I tried this previously and it didn’t seem to work.

And thanks @daniel, I will have a play with TCP sockets at some stage.

I ended up just using a timer and then updating the list if the timestamp on the presets file had changed. Hopefully, there is no major overhead here, so far so good.