}
}
@Override
public void serviceResolved(ServiceEvent serviceEvent) {
ServiceInfo info = serviceEvent.getInfo();
for (InetAddress inetAddress : info.getInet4Addresses()) {
bonour newItem = new bonour();
newItem.address = inetAddress.getHostAddress();
newItem.name = serviceEvent.getName();
if (info.hasData()) {
newItem.board = info.getPropertyString("board");
newItem.distroversion = info.getPropertyString("distro_version");
newItem.name = info.getServer();
}
while (newItem.name.endsWith(".")) {
newItem.name = newItem.name.substring(0, newItem.name.length() - 1);
}
newItem.port = Integer.toString(info.getPort());
synchronized (this) {
removeBoardswithSameAdress(newItem);
myComPorts.add(newItem);
}