react-native-zeroconf
react-native-zeroconf copied to clipboard
Migrate NSDService implementation of Android to RxDnssd
Hi @balthazar , This is an issue to migrate NSDService implementation of android to https://github.com/andriydruk/RxDNSSD. I have used jmDNS and NSD service and they work well on new phones where as older android phones and certain versions and networks have issues.
Explanation from the author ofRxDNSSD on why NSDService and jmdns and others are not nearly as good. https://andriydruk.com/post/mdnsresponder/
One main advantage is rxdnssd relies on apple implementaiton of zeroconf which is the best until now and has very low fault rates. I have tested this in production in my app since a year. If you are up for this change I can pick this up and make it and send a pull request. I will anyways make this change for myself. I thought i could contribute it back as well
Yeah it's true some people have had issues with android detection lately, most likely because of the new jmdns implementation. Would be great if you could shoot a PR for it, and we can direct people to use the tag and see how well it goes for them, to eventually switch over
Absolutely. Makes sense. i will publish a PR for the same as soon as i am ready.
These are really great news, thank you both @thehellmaker and @balthazar. @thehellmaker could you please share your time estimation for this enhancement? :)
Any update @thehellmaker?
Looking at the RxDNSSD API and really like what I am seeing. Not sure if @thehellmaker has time though.
@Vondry what is it that you think switching to RxDNSSD will improve?
https://code.google.com/archive/p/mdnsjava/source/default/source
Hi Guys, Sorry didn't see the update on this thread. Let me get back to you in a day about this migration.
- If I plan to take this up?
- If yes when will I have a patch for the same?
CHeers, Akash A
@PhuongNguyenETIT mDNS is a bad library. It is slow and secondly it doesn't work well with all android versions Please refer to my description about how RxDNSSD is better
@balthazar this is my first shot at native module. Could you please help me with the setup of local dependency setup for react-native-zeroconf? So is it just add dependency in package json as file://filepath ? . It seems like if i do that the module is not found
Which dependency are you trying to install, and which package.json are you referring to?
so actually i need to start working on migration of react-native-zeroconf from NSD service to rxdnssd2. For that i need to modify this native module
in my project i have a package json which says react-native-zeroconf: 'file://../react-native-zeroconf. However this always says module not found
Instead of npm remote dependency i need to
- clone react-native-zeroconf
- add dependency on this locally closed module
- start making change and test them locally
In the cloned react-native-zeroconf directory, you need to run npm link
and then in your project run npm link react-native-zeroconf
I'm very interested in this improvement! :-)
I have completed the implementation of this library migration. I have implemented a Zeroconf interface so that NsdService the old implmentation and DnsSd the new implementation are pluggable. Will open a pull request
@balthazar Please let me know if you have time to review this?
@balthazar I do not have permission to open PR on this. Please do provide me with appropriate permissions.
Anyone can PR so not sure what you want.
In order to open pull request i need to push changes to remote branch on github and i do not have permission to push to a branch
git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/dnssd-enhancement:refs/heads/dnssd-enhancement Pushing to https://github.com/balthazar/react-native-zeroconf.git remote: Permission to balthazar/react-native-zeroconf.git denied to thehellmaker. fatal: unable to access 'https://github.com/balthazar/react-native-zeroconf.git/': The requested URL returned error: 403 Completed with errors, see above
That's what a fork is for lmao
I have opened a pull request for the same https://github.com/balthazar/react-native-zeroconf/pull/131