mirror of
https://github.com/miekg/dns.git
synced 2025-08-18 07:26:58 +02:00
Re-use socket for udp
This commit is contained in:
parent
46399602a0
commit
146845ebde
@ -54,7 +54,6 @@ func main() {
|
|||||||
c.Net = "tcp"
|
c.Net = "tcp"
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if !*tcp {
|
if !*tcp {
|
||||||
// For UDP give each goroutine a socket.
|
// For UDP give each goroutine a socket.
|
||||||
// With TCP we re-dial every time
|
// With TCP we re-dial every time
|
||||||
@ -64,7 +63,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
defer c.Close()
|
defer c.Close()
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
r := new(dns.Msg)
|
r := new(dns.Msg)
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user