Skip to content

Commit

Permalink
Add extra docs for SetQuestion and SetNotify
Browse files Browse the repository at this point in the history
See issue miekg#196
  • Loading branch information
miekg committed Mar 25, 2015
1 parent 32c1cd5 commit 0fda12a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ func (dns *Msg) SetReply(request *Msg) *Msg {
return dns
}

// SetQuestion creates a question message.
// SetQuestion creates a question message, it sets the Question
// section, generates an Id and sets the RecursionDesired (RD)
// bit to true.
func (dns *Msg) SetQuestion(z string, t uint16) *Msg {
dns.Id = Id()
dns.RecursionDesired = true
Expand All @@ -33,7 +35,9 @@ func (dns *Msg) SetQuestion(z string, t uint16) *Msg {
return dns
}

// SetNotify creates a notify message.
// SetNotify creates a notify message, it sets the Question
// section, generates an Id and sets the Authoritative (AA)
// bit to true.
func (dns *Msg) SetNotify(z string) *Msg {
dns.Opcode = OpcodeNotify
dns.Authoritative = true
Expand Down

0 comments on commit 0fda12a

Please sign in to comment.