问题
I have written a sample app using NSD
as explained here.
The app works fine, it discovers services, resolve services and also report services lost if that service is unregistered.
But in a user scenario like:
- If
NSD
app is running on a device namedA
and has registered a service onA
- while few other devices named
B
,C
,D
are listening to this service. - service is discovered by
B
,C
,D
- expected behavior - now
wifi
is switched off an deviceA
. - I am expecting to receive a service lost message on devices
B
,C
,D
, but I am not getting it?
If I do not switch off wifi
on A
, but just close the NSD
app that unregisters the running service, I receive the service lost message on devices B
, C
, D
.
What could be the reason for this? Is this a known bug with NSD
? Or this is the way NSD
behaves?
来源:https://stackoverflow.com/questions/18358324/nsd-device-lost-message-not-received-on-disabling-wifi