class PacketGen::Header::DNS::QDSection
Public Instance Methods
read(str)
click to toggle source
Read Question
section from a string @param [String] str binary string @return [QDSection] self
# File lib/packetgen/header/dns/qdsection.rb, line 30 def read(str) clear return self if str.nil? PacketGen.force_binary str while !str.empty? && (self.size < @counter.to_i) question = Question.new(@dns).read(str) str.slice!(0, question.sz) push question end self end