Make the name more descriptive

This commit is contained in:
Miek Gieben 2012-01-13 11:38:08 +01:00
parent 95747ee8d1
commit ee11948fcb
2 changed files with 6 additions and 6 deletions

10
dns.go
View File

@ -67,11 +67,11 @@ import (
)
const (
Year68 = 2 << (32 - 1) // For RFC1982 (Serial Arithmetic) calculations in 32 bits.
DefaultMsgSize = 4096 // A standard default for larger than 512 packets.
UDPMsgSize = 1024 // A nice default for servers receiving UDP packets.
MaxMsgSize = 65536 // Largest possible DNS packet.
DefaultTtl = 3600 // Default TTL.
Year68 = 2 << (32 - 1) // For RFC1982 (Serial Arithmetic) calculations in 32 bits.
DefaultMsgSize = 4096 // A standard default for larger than 512 packets.
UDPReceiveMsgSize = 1024 // A nice default for servers receiving UDP packets.
MaxMsgSize = 65536 // Largest possible DNS packet.
DefaultTtl = 3600 // Default TTL.
)
// Error represents a DNS error

View File

@ -235,7 +235,7 @@ func (srv *Server) ServeUDP(l *net.UDPConn) error {
handler = DefaultServeMux
}
if srv.UDPSize == 0 {
srv.UDPSize = UDPMsgSize
srv.UDPSize = UDPReceiveMsgSize
}
for {
m := make([]byte, srv.UDPSize)