Reputation: 1410
I am working with JMDNS 3.5.4. My PC as well as other PCs are in multiple networks. I was wondering how to define the host-address (IP-address) which is broadcasted within the service. I tried to select an address using "InetAddress.getAllByName(host)" and use this address in the create function. However, this address is simply ignored in the ServiceInfo object.
JmDNS jmdns = JmDNS.create(INETADDRESS);
// Register a service
ServiceInfo serviceInfo = ServiceInfo.create("_http._tcp.local.", "example", 1234, "path=index.html");
jmdns.registerService(serviceInfo);
Later, the clients which find the service will use its port and IP-address to call a REST-service.
Upvotes: 0
Views: 60
Reputation: 1410
It seems like the DNS cache was the problem - I deleted it. I will evaluate my suspicion and update this post...
Upvotes: 0