forked from I2P_Developers/i2p.i2p
UPnP main() test tweak
This commit is contained in:
@@ -1067,9 +1067,16 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
|||||||
I2PAppContext ctx = new I2PAppContext(props);
|
I2PAppContext ctx = new I2PAppContext(props);
|
||||||
UPnP upnp = new UPnP(ctx);
|
UPnP upnp = new UPnP(ctx);
|
||||||
ControlPoint cp = new ControlPoint();
|
ControlPoint cp = new ControlPoint();
|
||||||
System.out.println("Searching for UPnP devices:");
|
long start = System.currentTimeMillis();
|
||||||
cp.start();
|
cp.start();
|
||||||
|
long s2 = System.currentTimeMillis();
|
||||||
|
System.out.println("Start took " + (s2 - start));
|
||||||
|
System.out.println("Searching for UPnP devices");
|
||||||
|
start = System.currentTimeMillis();
|
||||||
cp.search();
|
cp.search();
|
||||||
|
s2 = System.currentTimeMillis();
|
||||||
|
System.out.println("Search kickoff took " + (s2 - start));
|
||||||
|
System.out.println("Waiting 10 seconds for responses");
|
||||||
Thread.sleep(10000);
|
Thread.sleep(10000);
|
||||||
//while(true) {
|
//while(true) {
|
||||||
DeviceList list = cp.getDeviceList();
|
DeviceList list = cp.getDeviceList();
|
||||||
@@ -1081,7 +1088,7 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
|||||||
Device device = it.next();
|
Device device = it.next();
|
||||||
upnp.listSubDev(device.toString(), device, sb);
|
upnp.listSubDev(device.toString(), device, sb);
|
||||||
System.out.println("Here is the listing for device " + (++i) +
|
System.out.println("Here is the listing for device " + (++i) +
|
||||||
' ' + device.getFriendlyName() + " :");
|
": " + device.getFriendlyName() + " :");
|
||||||
System.out.println(sb.toString());
|
System.out.println(sb.toString());
|
||||||
sb.setLength(0);
|
sb.setLength(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user