Package org.cybergarage.upnp.ssdp

Examples of org.cybergarage.upnp.ssdp.SSDPSearchResponse


      String usn) {
    String localAddr = ssdpPacket.getLocalAddress();
    Device rootDev = getRootDevice();
    String rootDevLocation = rootDev.getLocationURL(localAddr);

    SSDPSearchResponse ssdpRes = new SSDPSearchResponse();
    ssdpRes.setLeaseTime(getLeaseTime());
    ssdpRes.setDate(cal);
    ssdpRes.setST(st);
    ssdpRes.setUSN(usn);
    ssdpRes.setLocation(rootDevLocation);
    ssdpRes.setBootId(getBootId());
    // Thanks for Brent Hills (10/20/04)
    ssdpRes.setMYNAME(getFriendlyName());

    int mx = ssdpPacket.getMX();
    TimerUtil.waitRandom(mx * 1000);

    String remoteAddr = ssdpPacket.getRemoteAddress();
    int remotePort = ssdpPacket.getRemotePort();
    SSDPSearchResponseSocket ssdpResSock = new SSDPSearchResponseSocket();
    if (Debug.isOn() == true)
      ssdpRes.print();
    int ssdpCount = getSSDPAnnounceCount();
    for (int i = 0; i < ssdpCount; i++)
      ssdpResSock.post(remoteAddr, remotePort, ssdpRes);

    return true;
View Full Code Here

TOP

Related Classes of org.cybergarage.upnp.ssdp.SSDPSearchResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.