In Files

  • resolv.rb

Resolv::DNS::Resource::IN::WKS

Constants

TypeValue

Attributes

address[R]
bitmap[R]
protocol[R]

Public Class Methods

decode_rdata(msg) click to toggle source
 
               # File resolv.rb, line 1674
def self.decode_rdata(msg)
  address = IPv4.new(msg.get_bytes(4))
  protocol, = msg.get_unpack("n")
  bitmap = msg.get_bytes
  return self.new(address, protocol, bitmap)
end
            
new(address, protocol, bitmap) click to toggle source
 
               # File resolv.rb, line 1661
def initialize(address, protocol, bitmap)
  @address = IPv4.create(address)
  @protocol = protocol
  @bitmap = bitmap
end
            

Public Instance Methods

encode_rdata(msg) click to toggle source
 
               # File resolv.rb, line 1668
def encode_rdata(msg)
  msg.put_bytes(@address.address)
  msg.put_pack("n", @protocol)
  msg.put_bytes(@bitmap)
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus