method
request
request(sender, tout)
public
Hide source
# File lib/resolv.rb, line 611 def request(sender, tout) timelimit = Time.now + tout sender.send while true now = Time.now timeout = timelimit - now if timeout <= 0 raise ResolvTimeout end select_result = IO.select(@socks, nil, nil, timeout) if !select_result raise ResolvTimeout end reply, from = recv_reply(select_result[0]) begin msg = Message.decode(reply) rescue DecodeError next # broken DNS message ignored end if s = @senders[[from,msg.id]] break else # unexpected DNS message ignored end end return msg, s.data end