Anonymous - 2011-11-09

I recently had the same issue - the listeners get added to the currently detected interfaces, but if they're not detected yet, they don't get added at all.

Rather than using a fairly random delay - I hooked up jmmdns with a NetworkTopologyListener and added/removed my listeners whenever the network topology is detected to have changed.

Perhaps it would be good to do this internally though? i.e. if someone has called addServiceTypeListener or addServiceListener, it performs like a standing request, rather than an instantaneous one. i.e. jmmdns remembers the call to add a listener of the specified type, and whenever the topology changes, it automatically adds/removes the appropriate listeners on that interface.