OpenHome Forum
Device scan time. - Printable Version

+- OpenHome Forum (
+-- Forum: OpenHome (/forumdisplay.php?fid=1)
+--- Forum: Net (/forumdisplay.php?fid=5)
+--- Thread: Device scan time. (/showthread.php?tid=1144)

Device scan time. - BitGriff - 29-09-2013 04:15 PM


I'm using CpDeviceListUpnpServiceType to find my devices.

How many time will scan proceed?

Will it periodically scan for a new devices until destroed, or i need to create CpDeviceListUpnpServiceType each time i need to scan?

Thanks in advance.

RE: Device scan time. - simonc - 30-09-2013 08:23 AM

You only need to construct a CpDeviceListUpnpServiceType (or any other device list). It always informs you when a device appears on or disappears from the network.

On construction, a device list will scan the network for matching devices. After that, it listens for ALIVE and BYEBYE notifications from devices which have just appeared or are just about to disappear.

If you want to force a rescan of the network (e.g. because your app briefly lost network connectivity or because you don't trust certain devices to send BYEBYEs) you can call Refresh() on your device list. You can call this any number of times. Note however that calling it while a previous refresh was in progress will cancel the previous refresh, starting another.

RE: Device scan time. - BitGriff - 30-09-2013 01:45 PM

Ok, thank you very much for your answer.