def on_readable
      datagram = nil
      begin
        datagram = @socket.recvfrom_nonblock(DATAGRAM_SIZE).first
      rescue Errno::ECONNREFUSED
      end

      address = response_address datagram rescue nil
      address ? on_success(address) : on_failure
      detach
    end
def on_readable
      datagram = nil
      begin
        datagram = @socket.recvfrom_nonblock(DATAGRAM_SIZE).first
      rescue Errno::ECONNREFUSED
      end

      address = response_address datagram rescue nil
      address ? on_success(address) : on_failure
      detach
    end
def on_readable datagram = nil begin datagram = @socket . recvfrom_nonblock ( DATAGRAM_SIZE ) . first rescue Errno :: ECONNREFUSED end address = response_address datagram rescue nil address ? on_success ( address ) : on_failure detach end
Called by the subclass when the DNS response is available
Called by the subclass when the DNS response is available