Reputation: 81
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);
Upvotes: 3
Views: 1197
Reputation: 41
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);
Upvotes: 4