Finish the new query API
This commit is contained in:
parent
be5e51a6ab
commit
b4e28e3d56
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
func main() {
|
||||
r := new(dns.Resolver)
|
||||
r.FromFile("/etc/resolv.conf")
|
||||
r.FromFile("/etc/resolv.conf") // Need to fix this a bit...
|
||||
if len(os.Args) != 2 {
|
||||
fmt.Printf("%s DOMAIN\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
|
|
4
dns.go
4
dns.go
|
@ -20,7 +20,7 @@
|
|||
// Basic use pattern for creating such a resolver:
|
||||
//
|
||||
// in := make(chan Query)
|
||||
// out := QueryAndServeUDP(in, nil) // nil means use QueryDefault
|
||||
// out := QueryAndServeUDP(in, nil) // nil means use QueryDefault()
|
||||
// d := new(Conn)
|
||||
// d.RemoteAddr = "8.8.8.8:53"
|
||||
//
|
||||
|
@ -30,7 +30,7 @@
|
|||
// m.Question[0] = Question{"miek.nl", TypeSOA, ClassINET}
|
||||
//
|
||||
// in <- Query{Msg: m, Conn: d} // Send query using the above message
|
||||
// reply := <-out // Listen for replie(s)
|
||||
// reply := <-out // Listen for the reply
|
||||
//
|
||||
// Server side programming is also supported also by using a Conn structure.
|
||||
// Basic use pattern for creating an UDP DNS server:
|
||||
|
|
Loading…
Reference in New Issue