mirror of
https://github.com/andwati/dns-resolver.git
synced 2026-11-25 03:18:46 +00:00
implemented query types constants
This commit is contained in:
@@ -1 +1,13 @@
|
||||
package dns
|
||||
|
||||
type DNSMessage struct {
|
||||
Header DNSHeader
|
||||
Question DNSQuestion
|
||||
}
|
||||
|
||||
// convert dns message into a byte slice
|
||||
func (m *DNSMessage) Serialize() []byte {
|
||||
header := m.Header.Serialize()
|
||||
question := m.Question.Serialize()
|
||||
return append(header, question...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user