3

Using jmdns 3.4.1, I'm able to see the services advertised by the machines in the LAN, I can also create a service and register it, so that I can see it in my machine. However, when I create a new service in another machine of the LAN, I cannot see it in my machine. I'm using the following code in the other machine:

service = ServiceInfo.create("_workstation._tcp.local.", "service1" ,80, "foobar"); 
jmdns = JmDNS.create();
jmdns.registerService(service); 
jonsca
  • 10,218
  • 26
  • 54
  • 62
mimou
  • 81
  • 1
  • 6

1 Answers1

4

That should be the problem of address.
When you create an object jmdns, it's better to add the inetaddress.

Example:

InetAddress Address = InetAddress.getLocalHost(); 
final JmDNS  jmdns = JmDNS.create(Address);
Zuul
  • 16,217
  • 6
  • 61
  • 88