IPCSocket works similarly to a regular TCPSocket, but instead of using an IP address and Port number, a local file path is used, leading to a so-called socket file. The same path must used on both ends of the connection, and it should preferably be a unique file location inside a temporary folder that’s not usually visible to the user. The file might remain in existance even after closing the connection, so you should delete any leftover files from previous connections when you make a new connection.
To connect, first one side must invoke Listen after having set the Path. Then the other can connect to the socket file using the Connect method.
To terminate the connection, call the Close method. This will invoke the Error event on the other end, with its RuntimeException.ErrorNumber set to 102.
I never see the .Listen used.
its a Listen Button? and then it called CommSocket.Listen
One of my programs calls VLC. But if the user quits VLC I want my program to end as well.
From what I read from the threads, you use an IPCSocket you can “communicate” between programs, and you can listen to another program, and if it doesn’t respond or not “be there” you can act on it.
An IPCSocket requires both programs to participate. If VLC wasn’t designed to communicate this way (which I assume is true), then an IPCSocket isn’t the solution.
I would suggest you launch VLC in a Shell object with Mode=Asynchronous. When/if the user quits VLC, the Shell’s Completed event will fire and your code can react accordingly.
I followed the plugin installation from their youtube channel and then after fighting with dependancies (finally just putting all of the plug ins in the Xojo / Plugins folder) tried with one of the examples they have.