method

allocate_request_id

v2_6_3 - Show latest stable - Class: Resolv::DNS
allocate_request_id(host, port)
public

No documentation available.

# File lib/resolv.rb, line 615
    def self.allocate_request_id(host, port) # :nodoc:
      id = nil
      RequestIDMutex.synchronize {
        h = (RequestID[[host, port]] ||= {})
        begin
          id = random(0x0000..0xffff)
        end while h[id]
        h[id] = true
      }
      id
    end