Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposition (Android): resolve multiple IP addresses for DNSSD instead of a single IPv4 #163

Open
valentinmakov opened this issue Sep 1, 2021 · 0 comments

Comments

@valentinmakov
Copy link
Contributor

Hi,

I noticed a couple of things that might be improved in the project.

First, I see that when using DNSSD mode on Android, services always resolve with a single IP address which might be not enough sometimes. After a brief investigation (I am no Java expert) I saw that in android/src/main/java/com/balthazargronon/RCTZeroconf/rx2dnssd/DnssdImpl.java file the IP addresses are retrieved with the help of a deprecated getInet4Address method (line 87). Replacing it with by getInetAddresses allows to get multiple addresses — IPv4 as well as IPv6. At least that what happens when running the app on iOS.

I could make a PR myself, but I can't find a way to push the code as I seem not to have a permission to do that.

The second thing I wanted to propose is to update the Readme, because it is not obvious now that a user can switch between default NSD and additional DNSSD modes. I took me a day to figure out that this option existed at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant