You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I've been using getaddrinfo() to resolve IP from hostname, but the problem is that getaddrinfo() doesn't allow for specifying a network interface, and multiple devices with same hostname on different interfaces will not work with this method.
I couldn't find a generic method to work around this problem, except implementing the Bonjour / Avahi API.
DNSServiceGetAddrInfo allows to do that and it would make the library very powerful and complete to have that inside, especially since Bonjour and Avahi already have those methods ready to use.
I have tried myself but the callback of DNSServiceGetAddrInfo was never triggered, I'm not sure why but if someone has more insight on this this would be great !a
The text was updated successfully, but these errors were encountered:
Just for info, I forked and added the piece of code to include servus_port and servus_ip in the data. This is only in the dns-sd implementation, and JM Celerier has made the same for the avahi implementation.
Mine is quite dirty so I'm not making a PR for that but there is everything needed to do some proper, complete system for full-info retrieval which would make this library waaaay more useful than only getting the hostname.
Hello,
I've been using getaddrinfo() to resolve IP from hostname, but the problem is that getaddrinfo() doesn't allow for specifying a network interface, and multiple devices with same hostname on different interfaces will not work with this method.
I couldn't find a generic method to work around this problem, except implementing the Bonjour / Avahi API.
DNSServiceGetAddrInfo allows to do that and it would make the library very powerful and complete to have that inside, especially since Bonjour and Avahi already have those methods ready to use.
I have tried myself but the callback of DNSServiceGetAddrInfo was never triggered, I'm not sure why but if someone has more insight on this this would be great !a
The text was updated successfully, but these errors were encountered: