def validate!(sender, time: monotonic_timestamp)
      key = session_key sender
      last_observed = @session.fetch(key) { raise UnknownSender, sender }
      raise InvalidSender, sender if expired? last_observed, time, @timeout

      @session[key] = time
      nil
    end
def validate!(sender, time: monotonic_timestamp)
      key = session_key sender
      last_observed = @session.fetch(key) { raise UnknownSender, sender }
      raise InvalidSender, sender if expired? last_observed, time, @timeout

      @session[key] = time
      nil
    end
Renews the given sender if it is still valid within the session and raises
 an exception otherwise.

 @raise [UnknownSender] if the given sender is not registered.
 @raise [InvalidSender] if the given sender is not valid.

 @param  sender [Socket::UDPSource] the udp client.
 @param  time [Numeric] the current time. The current time will be used if
   not specified.
 @return [nil]