I just checked the InterprocessConnection class, but it seems to lack an important feature for me, namely the ability to send messages to as many listening processes as I want. Is this difficult to do?
The only quick solution i find is to use N pipes:
- At start, each process first tries to open a pipe, going from myPipe0 to myPipeN (if myPipe0 cannot be opened, it tries myPipe1, then myPipe2, asf. until myPipeN).
- When one of the processes wants to send a message to all other processes, it will send the same message to myPipe0 … myPipeN so all processes get it.
Is this a correct way of doing it? Is there a simpler/neater way?