Example #1
0
func q(w dns.RequestWriter, m *dns.Msg) {
	w.Send(m)
	r, err := w.Receive()
	if err != nil {
		fmt.Printf("%s\n", err.Error())
	}
	w.Write(r)
}
Example #2
0
func qhandler(w dns.RequestWriter, m *dns.Msg) {
	w.Send(m)
	r, _ := w.Receive()
	w.Write(r)
}
Example #3
0
func qhandler(w dns.RequestWriter, m *dns.Msg) {
	w.Dial()
	defer w.Close()
	if err := w.Send(m); err != nil {
		w.Write(nil)
		return
	}
	r, _ := w.Receive()
	w.Write(r)
}
Example #4
0
File: q.go Project: ikbear/dns
func q(w dns.RequestWriter, m *dns.Msg) {
	if err := w.Send(m); err != nil {
		fmt.Printf("%s\n", err.Error())
		w.Write(nil)
		return
	}
	r, err := w.Receive()
	if err != nil {
		fmt.Printf("%s\n", err.Error())
		w.Write(nil)
		return
	}
	w.Close()
	if w.TsigStatus() != nil {
		fmt.Printf(";; Couldn't verify TSIG signature: %s\n", w.TsigStatus().Error())
	}
	w.Write(r)
}