public void announce(String bindAddr) { // uuid:device-UUID::urn:schemas-upnp-org:service:serviceType:v Device rootDev = getRootDevice(); String devLocation = rootDev.getLocationURL(bindAddr); String serviceNT = getNotifyServiceTypeNT(); String serviceUSN = getNotifyServiceTypeUSN(); Device dev = getDevice(); SSDPNotifyRequest ssdpReq = new SSDPNotifyRequest(); ssdpReq.setServer(UPnP.getServerName()); ssdpReq.setLeaseTime(dev.getLeaseTime()); ssdpReq.setLocation(devLocation); ssdpReq.setNTS(NTS.ALIVE); ssdpReq.setNT(serviceNT); ssdpReq.setUSN(serviceUSN); SSDPNotifySocket ssdpSock = new SSDPNotifySocket(bindAddr); Device.notifyWait(); ssdpSock.post(ssdpReq); }
//////////////////////////////////////////////// // Constructor //////////////////////////////////////////////// public ControlResponse() { setServer(UPnP.getServerName()); }