## net.i2p.client.streaming
Class Connection.ResendPacketEvent

    java.lang.Object
      net.i2p.util.SimpleTimer2.TimedEvent
          net.i2p.client.streaming.Connection.ResendPacketEvent

All Implemented Interfaces:
  Runnable

Enclosing class:
  Connection

     class Connection.ResendPacketEvent

extends SimpleTimer2.TimedEvent

Coordinate the resends of a given packet

Field Summary

Fields inherited from class net.i2p.util.SimpleTimer2.TimedEvent
`DEFAULT_FUZZ`

Constructor Summary
`Connection.ResendPacketEvent(PacketLocal packet, long delay)`

Method Summary
`long` `getNextSendTime()`
`boolean` `retransmit(boolean penalize)` Retransmit the packet if we need to.
`void` `timeReached()` Simple interface for events to be queued up and notified on expiration the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)

Methods inherited from class net.i2p.util.SimpleTimer2.TimedEvent
`cancel, forceReschedule, reschedule, reschedule, run, schedule, setFuzz`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Connection.ResendPacketEvent

    public Connection.ResendPacketEvent(PacketLocal packet,
                                        long delay)

Method Detail

### getNextSendTime

    public long getNextSendTime()

### timeReached

    public void timeReached()

  Description copied from class: `SimpleTimer2.TimedEvent`
  Simple interface for events to be queued up and notified on expiration the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)

  Specified by:
    `timeReached` in class `SimpleTimer2.TimedEvent`

### retransmit

    public boolean retransmit(boolean penalize)

  Retransmit the packet if we need to. ackImmediately() above calls directly in here, so we have to use forceReschedule() instead of schedule() below, to prevent duplicates in the timer queue.

  Parameters:
    `penalize` - true if this retransmission is caused by a timeout, false if we are just sending this packet instead of an ACK
  Returns:
    true if the packet was sent, false if it was not