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