Closed makon closed 3 years ago
Thanks
Thx for the fix.
I guess I wasn't clear on the issue. So the main issue on windows is that it will never notify about any service because the ifaceIPs
dictionary is always empty for windows.
The root cause is that golang does not support control messages
on windows, so you will never receive the interface information. Hence the ifaceIPs
dictionary is always empty. Not sure what is the best solution for that case.
I hope this was more clear
Maybe you could use the Config.IPs field to workaround this limitation. But this is not recommended because of #8
Unfortunately setting a control message is not supported for windows, see here: https://github.com/golang/net/blob/master/ipv6/control_windows.go
So a
Request
struct will never have aiface
. It will always benil
: https://github.com/brutella/dnssd/blob/0d9d12fe7a9f5556afb42de4d7cd81884871d417/mdns.go#L222This leads to a nil pointer exception at: https://github.com/brutella/dnssd/blob/0d9d12fe7a9f5556afb42de4d7cd81884871d417/browse.go#L72
And it will never notify about any service because the
ifaceIPs
dictionary is always empty for windows: https://github.com/brutella/dnssd/blob/0d9d12fe7a9f5556afb42de4d7cd81884871d417/browse.go#L79