novotnyllc / Zeroconf

Bonjour support for .NET Core, .NET 4.6, Xamarin, and UWP
MIT License
370 stars 92 forks source link

Support for IPv6 addresses when resolving host #188

Closed YannTremblay96 closed 2 years ago

YannTremblay96 commented 3 years ago

It seems like listing IPv6 addresses is not currently supported in the latest version. Or maybe I am doing something wrong ? But when searching in ZeroconfResolver.ResponseToZeroconf I found that only the RecordA records are parsed for addresses when building the ZeroconfHost and not the RecordAAAA ones.

I added a tiny bit of code and was able to bring up those addresses in the IPAddresses host field which can afterwards be parsed. I could make a PR to review what I did. Code was manually tested on a device which registers an IPv6 address and seems to work pretty good. I did not even need to do anything but parse the AAAA records since those are already implemented in the records framework.

Pretty new to collaborating on open source projects so I didn't know if making a PR right off the bat would seem a little aggressive or presumptuous... Anyhoo thanks in advance !

**Edited to clarify which level of IP address records are not parsed for IPv6 (the RecordAAAA)

YannTremblay96 commented 2 years ago

Closing this issue since the PR addressing this problem has been merged in the main. Solved with PR #191.