I have a database client application. Some people will run multiple instances (i.e. processes) of it to connect to different databases simultaneously. I'd like to have this app accept a custom URI scheme for simple commands such as 'open record 123'. The URI contains the database it pertains to, so, depend on the contents of the URL, one particular process is 'eligible' to handle it.
As such, I've decided to create an additional app for URI handling that 1) isn't constantly running, but only invoked through Windows when a URI is clicked somewhere, and 2) finds the right client and passes the URL on to it. I've used an IpcServerChannel
on the database client, and an IpcClientChannel
in the URI handler, so that the URI handler can ask the client which database it's responsible for.
How do I handle this for multiple clients, though? How can the URI handler 'discover' which clients (i.e. IPC servers) are currently running, and how to connect to them through IPC?