Pipe : Why connectToPipe always return true?

Hello Jules,

I'm working on a communication between a plugin and an app, using InterprocessConnection.

I'd expected that 

bool  connectToPipe (const String &pipeName, int pipeReceiveMessageTimeoutMs=-1)

would return true only if the specified pipe had been created previously, but it always return true, even if trying to connect to an inexistent pipe !

I also tried NamedPipe with

bool  openExisting (const String &pipeName)

and it also always return true... I'm on OSX 10.7.5. 

is that normal ?


Overall, I just need my app to be aware when a plugin is running in the DAW, so I wanted to create a pipe on the plugin, and the app would know if a plugin is present by checking if there's a pipe created.


Thanks for any hint.






The way it works is that it won't attempt to actually open the pipe until you try to read or write to it, so that even if the other end isn't ready yet, you can still have your reader open and waiting for something else to connect to.

TBH I'm not sure if that's a good way for it to work, but I think that to change it now might affect existing code. I actually don't use this class much myself - does anyone else have an opinion about this or how it should work?

I have no idea about how it should be done otherwise, but few lines in the documentation about that behavior would be a good things ;-)