Closed ripienaar closed 3 years ago
Another option, which wont change behaviour for anyone but allow us to opt out of this behaviour at build time is this:
var DefaultResponder Responder
var StartDefaultResponder = "true"
if StartDefaultResponder == "true" {
var DefaultResponder, _ = NewResponder()
}
This way I can do go build -ldflags="-X 'github.com/brutella/dnssd.StartDefaultResponder=false'"
to turn this off, though I think this is a bad default thing to do to any and all projects that happen to include this packge so would rather prefer the option to remove this behaviour entirely
@brutella any chance we can get this merged? this way I can at least refer to it in my go.mod and resolve this matter
Yeah, I think yours is a good temporary solution.
Any program that uses this, or any code that depends on it, will by default and without any way to opt out open port 5353 and do some mdns communications over it.
I don't think this is useful since any real use will create a dedicated responder.
I also cannot find this default responder used in any code anywhere
Signed-off-by: R.I.Pienaar rip@devco.net