That could be a problem, if the COM interface doesn’t let you specify a target connection or if Adobe hasn’t put something in place to let you choose a target at run-time. I would be surprised if at least one of those wasn’t true.
That’s a good point, that does sound likely. But again, I wouldn’t be surprised of they had something similar in store for OSX.
Yes, welcome to my world.
As with QML, I would first try and find a way in which you don’t need to have it shutdown on closing the GUI. See if there’s any way of having your server run asynchronously.
Once you’re sure there isn’t a way, then the only reliable way I know is to start dealing with heartbeats. Having the server continuously ask “is there a client? is there a client? …” And once the GUI isn’t there to reply, shutdown.