func (m *Message) Encode(b *dns.Wirebuf) {
	m.Header.QDCOUNT = uint16(len(m.Question))
	m.Header.ANCOUNT = uint16(len(m.Answer))
	m.Header.NSCOUNT = uint16(len(m.Authority))
	m.Header.ARCOUNT = uint16(len(m.Additional))
	m.Header.Encode(b)
	for _, q := range m.Question {
		q.Encode(b)
	}
	for _, r := range m.Answer {
		r.Encode(b)
	}
	for _, r := range m.Authority {
		r.Encode(b)
	}
	for _, r := range m.Additional {
		r.Encode(b)
	}
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (m *Message) Encode(b *dns.Wirebuf) {
	m.Header.QDCOUNT = uint16(len(m.Question))
	m.Header.ANCOUNT = uint16(len(m.Answer))
	m.Header.NSCOUNT = uint16(len(m.Authority))
	m.Header.ARCOUNT = uint16(len(m.Additional))
	m.Header.Encode(b)
	for _, q := range m.Question {
		q.Encode(b)
	}
	for _, r := range m.Answer {
		r.Encode(b)
	}
	for _, r := range m.Authority {
		r.Encode(b)
	}
	for _, r := range m.Additional {
		r.Encode(b)
	}
}
func ( m * Message ) Encode ( b * dns . Wirebuf ) { m . Header . QDCOUNT = uint16 ( len ( m . Question ) ) m . Header . ANCOUNT = uint16 ( len ( m . Answer ) ) m . Header . NSCOUNT = uint16 ( len ( m . Authority ) ) m . Header . ARCOUNT = uint16 ( len ( m . Additional ) ) m . Header . Encode ( b ) for _ , q := range m . Question { q . Encode ( b ) } for _ , r := range m . Answer { r . Encode ( b ) } for _ , r := range m . Authority { r . Encode ( b ) } for _ , r := range m . Additional { r . Encode ( b ) } }
Implementation of dns.Wirer
Implementation of dns . Wirer