method
request
request(sender, tout)
public
Hide source
# File lib/resolv.rb, line 610 def request(sender, tout) timelimit = Time.now + tout sender.send while (now = Time.now) < timelimit timeout = timelimit - now if !IO.select([@sock], nil, nil, timeout) raise ResolvTimeout end reply, from = recv_reply 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