Sha256: cd740e2a219d8d50f6e10a290715560dc135dbaa5a627f6759d8b43810f45cf3
Contents?: true
Size: 1.07 KB
Versions: 15
Compression:
Stored size: 1.07 KB
Contents
module PacketGen module Header class DNS # Define a DNS Question Section # @author Sylvain Daubert class QDSection < RRSection # @!method push(q) # Add a question to this section without incrementing associated counter # @param [Question,Hash] q # @return [QDSection] self # @!method <<(q) # Add a question to this section. Increment associated counter # @param [Question,Hash] q # @return [QDSection] self # @!method delete(q) # Delete a question # @param [Question] q # @return [Question] # Read Question section from a string # @param [String] str binary string # @return [QDSection] self def read(str) clear return self if str.nil? force_binary str while str.length > 0 and self.size < @counter.to_i question = Question.new(@dns).read(str) str.slice!(0, question.sz) self.push question end self end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems