becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

Closing the service is too slow #47

Closed Ivan-Perez closed 6 years ago

Ivan-Perez commented 6 years ago

Hi,

It takes about 10 seconds to get the promise's result from the close() method. Why is it so slow? What is it really doing when closing the service?

Thanks!

becvert commented 6 years ago

Android? could it be https://github.com/jmdns/jmdns/issues/82

becvert commented 6 years ago

Please upgrade to 1.2.8 and let me know if it's better

Ivan-Perez commented 6 years ago

Yes, it was Android.

After upgrading to 1.2.8 it works faster, now it takes about 4 seconds. I don't know if it can be improved, but anyway, it's something better.

I'm marking this issue as closed as it's related to jmDNS, not with this project itself. Since Android 4.1 (API 16) there is support for mDNS natively (https://developer.android.com/training/connect-devices-wirelessly/nsd.html), so no need to use the jmDNS library. Have you considered it? Ionic 2 by default seem to use API 16 as min SDK.

Thanks!

becvert commented 6 years ago

7 about NSD. It isn't full featured as JmDNS so I stick with it for now.