request(sender, tout) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

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
Register or log in to add new notes.