becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

Version 1.3.0 #56

Closed emcniece closed 6 years ago

emcniece commented 6 years ago

TODO

emcniece commented 6 years ago

In hindsight, the reInit() merge should have been v1.3.0 (minor bump, non-backward-compatible) and the callbacks should have incremented to v1.3.1 (patch, backward-compatible). Apologies.

becvert commented 6 years ago

what about you remove 1.2.9 in the changelog and put reInit with the callbacks in 1.3.0? release 1.2.9 won't exist anyway as a tag nor on npm

emcniece commented 6 years ago

Sounds good - modified the changelog.

becvert commented 6 years ago

I've been thinking a bit more about this: instead of a reInit that destroys everything, couldn't we just reset the network interfaces and re-publish/re-watch the services on the new addresses seamlessly? or do you think it's better that that's the responsability of the app to re-register its services?

emcniece commented 6 years ago

Explicit methods (or "less magic") might be a better path for implementation - exposing lower-level calls and building on top can allow for flexibility either way.

For example, perhaps reInit() exists now and in the future we could add a reWatchOnNetChange = true option.

JmDNS does this in a way - they have an (experimental) JmmDNS class that "will monitor network topology changes, and will create or destroy JmDNS instances as required." They also note that it is the app developer's responsibility to manage these JmDNS instances.

The reInit() method is really just the first step in this process. Re-watching the existing service types could be a nice extra feature, but I can imagine a case in which an app may want to watch for different services.

becvert commented 6 years ago

I'll let you tag 1.3.0 then I'll publish on npm

emcniece commented 6 years ago

Merged & tagged!

becvert commented 6 years ago

published on npm. good job!