0

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.

1 Answer 1

0

It seems like the DNS cache was the problem - I deleted it. I will evaluate my suspicion and update this post...

Not the answer you're looking for? Browse other questions tagged or ask your own question.