method
get_labels
get_labels(limit=nil)
public
Hide source
# File lib/resolv.rb, line 1506 def get_labels(limit=nil) limit = @index if !limit || @index < limit d = [] while true case @data[@index].ord when 0 @index += 1 return d when 192..255 idx = self.get_unpack('n')[0] & 0x3fff if limit <= idx raise DecodeError.new("non-backward name pointer") end save_index = @index @index = idx d += self.get_labels(limit) @index = save_index return d else d << self.get_label end end return d end