Len returns the rr len of the uncompressed format.

This commit is contained in:
Matthijs Mekking 2016-03-17 15:07:51 +01:00
parent b9171237b0
commit 5107215070
1 changed files with 5 additions and 0 deletions

5
msg.go
View File

@ -1896,6 +1896,11 @@ func Copy(r RR) RR {
return r1
}
// Len returns the length (in octets) of the uncompressed RR in wire format.
func Len(r RR) int {
return r.len()
}
// Copy returns a new *Msg which is a deep-copy of dns.
func (dns *Msg) Copy() *Msg {
return dns.CopyTo(new(Msg))