I am sure there is a better way to describe the challenge I have, but hopefully this will be clear enough.
I have a server running on a random host + port within the local area network, I would like to know that hostname and port, or at least the random port, so that my (web) client can connect to the correct URL.
This specific server happens to run and respond to M-SEARCH (SSDP) queries, but I do not think you can query that from a webpage/javascript.
I don't mind using a common (cloud) server to help with the process.
edit: Come to think about it, I don't know what I was thinking about UPNP etc, my 'client' only has a browser and a url to provide, so I cannot run evena javascript before he hits my server:port. perhaps the solution has to be with some kind of well known address on the cloud or a well known port on the host.