123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolv::DNS::Requester::MDNSOneShot

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Gem::Resolv::DNS::Requester::UnconnectedUDP
Defined in: lib/rubygems/vendor/resolv/lib/resolv.rb

Class Method Summary

Instance Method Summary

Constructor Details

This class inherits a constructor from Gem::Resolv::DNS::Requester::UnconnectedUDP

Instance Method Details

#sender(msg, data, host, port = Port)

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 886

def sender(msg, data, host, port=Port)
  lazy_initialize
  id = DNS.allocate_request_id(host, port)
  request = msg.encode
  request[0,2] = [id].pack('n')
  sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
  return @senders[id] =
    UnconnectedUDP::Sender.new(request, data, sock, host, port)
end

#sender_for(addr, msg)

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 896

def sender_for(addr, msg)
  lazy_initialize
  @senders[msg.id]
end