java.lang.Object
net.i2p.util.SimpleTimer2.TimedEvent
net.i2p.router.crypto.ratchet.ACKTimer
All Implemented Interfaces:
Runnable

class ACKTimerextends SimpleTimer2.TimedEvent
Timer for sending ratchet-layer acknowledgments when application responses are delayed, supporting NS, NSR, ACK requests, and forward next key blocks.

The vast majority of these will be cancelled before firing, when streaming sends a response. This should only fire if streaming drops completely, and for certain datagram traffic patterns.

  • Field Details

    • _context

      private final RouterContext _context
      The router the timer runs on.
    • _log

      private final Log _log
      Logger for this class.
    • _from

      private final Destination _from
      The peer we sent the message to.
    • _to

      private final Destination _to
      The peer we received the message from.
    • EXPIRATION

      private static final long EXPIRATION
      How long an unacknowledged message is kept - 60 seconds.
      See Also:
    • LS_MASK

      private static final int LS_MASK
      SendMessageOptions.LS_MASK, don't send LS. Never bundle our lease set with a ratchet-layer ACK: we don't need to, and it would be the wrong lease set for subsessions.
      See Also:
  • Constructor Details

    • ACKTimer

      public ACKTimer(RouterContext context, Destination from, Destination to)
      ACK timer for ratchet.
      Parameters:
      context - router context for timer and logging
      from - local destination ACK will come from, non-null
      to - remote destination ACK will go to, non-null
  • Method Details

    • timeReached

      public void timeReached()
      Description copied from class: SimpleTimer2.TimedEvent
      Called when this event's scheduled time arrives. Must NOT block. For periodic events, call schedule(period) at the end to self-reschedule.
      Specified by:
      timeReached in class SimpleTimer2.TimedEvent