Oct 17, 2011 at 3:04 AM
Edited Oct 17, 2011 at 3:40 AM
Are there any differences between the static Discovery.FindDevicesAsync, Discovery.FindServicesAsync and the instance Start()?
If I use the static Discovery.FindServicesAsync, I can find 3 services for my router.
If I use the static Discovery.FindDevicesAsync, I can only find 1 service for my router.
If I use the instance Start() as shown in the following code, only 1 service is found too for the same router.
Discovery UPnPDiscovery = new Discovery(null, AddressFamilyFlags.IPvBoth, false);
UPnPDiscovery.DeviceAdded += new DeviceAddedEventHandler(UPnPDiscovery_DeviceAdded);
UPnPDiscovery.DeviceRemoved += new DeviceRemovedEventHandler(UPnPDiscovery_DeviceRemoved);
UPnPDiscovery.SearchComplete += new SearchCompleteEventHandler(UPnPDiscovery_SearchComplete);
I have tried version 1.0, 1.1 and 1.4 and the results are the same. I don't want to use the static Discovery.FindServicesAsync since I can't stop the discovery thread immediately when my program stops. So I prefer the instance one since it provides
Thank you very much.