java.lang.Object
net.i2p.router.transport.udp.UDPSender.Runner
All Implemented Interfaces:
Runnable
Enclosing class:
UDPSender

private class UDPSender.Runnerextends Object implements Runnable
Internal runner class responsible for dequeuing and sending UDP packets. This class runs on its own dedicated high-priority thread.
  • Constructor Details

    • Runner

      private Runner()
      Writes packets to the socket.
  • Method Details

    • run

      public void run()
      Dequeue and send UDP packets until shutdown.
      Specified by:
      run in interface Runnable
    • getNextPacket

      private UDPPacket getNextPacket()
      Retrieves the next UDP packet from the outbound queue for sending.

      Packets whose lifetime exceed three times the CoDel target delay are dropped to avoid sending stale packets. Queue blocking and interrupt handling is performed here.

      Poison packets signal shutdown and cause this method to return null.

      Returns:
      the next valid UDPPacket to send, or null if shutdown is triggered by poison packet