Class: Resolv::DNS::Requester::MDNSOneShot
- Inherits:
-
UnconnectedUDP
- Object
- Resolv::DNS::Requester
- UnconnectedUDP
- Resolv::DNS::Requester::MDNSOneShot
- Defined in:
- lib/resolv.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from UnconnectedUDP
#close, #initialize, #recv_reply
Methods inherited from Resolv::DNS::Requester
Constructor Details
This class inherits a constructor from Resolv::DNS::Requester::UnconnectedUDP
Instance Method Details
#sender(msg, data, host, port = Port) ⇒ Object
848 849 850 851 852 853 854 855 |
# File 'lib/resolv.rb', line 848 def sender(msg, data, host, port=Port) 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) ⇒ Object
857 858 859 |
# File 'lib/resolv.rb', line 857 def sender_for(addr, msg) @senders[msg.id] end |