grandcat / zeroconf

mDNS / DNS-SD Service Discovery in pure Go (also known as Bonjour)
Other
748 stars 172 forks source link

add SelectFilter option to support custom filters #79

Open evangwt opened 3 years ago

evangwt commented 3 years ago

It is difficult to bind a specific interface on Win7 since the implement of SetControlMessage is blank. So custom filters is the most simple way for me to solve this problem. And I think it is also useful for other situations.

grandcat commented 3 years ago

So you mean that SelectIfaces option does not work for you on Windows?

evangwt commented 3 years ago

So you mean that SelectIfaces option does not work for you on Windows?

When I use config file to initialize my options, SelectIfaces is not suitable to do that since these properties maybe too difficult for some users to edit. So I add SelectFilter to support some simple custom options inside my filter functions. Also, this option is very flexible to use.