code: private DeviceData checkWithHostAddress(DeviceData deviceData, DeviceProxy deviceProxy) throws DevFailed {
  // ToDo
          DevVarLongStringArray lsa = deviceData.extractLongStringArray();
          try {
              java.net.InetAddress iadd =
                      java.net.InetAddress.getByName(deviceProxy.get_host_name());
              String hostAddress = iadd.getHostAddress();
              System.err.println("Host address is " + hostAddress);
              System.err.println("Server returns  " + lsa.svalue[0]);
              if (! lsa.svalue[0].startsWith("tcp://"+hostAddress)) { //  Addresses are different
                   String  wrongAdd = lsa.svalue[0];
                   int idx = lsa.svalue[0].lastIndexOf(':');   //  get port
                   if (idx>0) {
                       lsa.svalue[0] = "tcp://" + hostAddress + lsa.svalue[0].substring(idx);
                       lsa.svalue[1] = "tcp://" + hostAddress + lsa.svalue[1].substring(idx);
                       System.out.println(wrongAdd + " ---> "+lsa.svalue[0]);
                       deviceData = new DeviceData();
                       deviceData.insert(lsa);
                       isEndpointAvailable(lsa.svalue[0]);
                   }
              }
          } catch (UnknownHostException e) {
              Except.throw_exception("UnknownHostException",
                      e.toString(), "ZmqEventConsumer.checkZmqAddress()");
          }
          //System.out.println("---> Connect on "+deviceData.extractLongStringArray().svalue[0]);
          return deviceData;
      }
docs: ===============================================================