All Implemented Interfaces:
Runnable
Enclosing class:
I2Ping

private class I2Ping.PingHandlerextends I2PAppThread
Thread running one ping session.
  • Field Details

    • destination

      private final String destination
      The destination being pinged.
    • cnt

      private final int cnt
      Number of pings to send.
    • timeout

      private final long timeout
      Time allowed for one reply.
    • countPing

      private final boolean countPing
      True to count the replies toward the tunnel stats.
    • reportTimes

      private final boolean reportTimes
      True to report each reply time.
    • localPort

      private final int localPort
      The local I2CP port to send from.
    • remotePort

      private final int remotePort
      The remote I2CP port to send to.
  • Constructor Details

    • PingHandler

      public PingHandler(String dest, int count, int fromPort, int toPort, long timeout, boolean countPings, boolean report)
      Runs one ping session.
      Parameters:
      dest - the destination to ping
      count - the number of pings to send
      fromPort - the local port to send from
      toPort - the remote port to send to
      timeout - the time allowed for one reply
      countPings - true to count replies toward the tunnel stats
      report - true to report each reply time
  • Method Details

    • run

      public void run()
      Ping the destination once per requested count and report the result.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class I2PThread
    • lookup

      private Destination lookup(String name) throws I2PException
      Finds the destination for a name or address.
      Parameters:
      name - the base32 or base64 address, or a local name
      Returns:
      the destination found
      Throws:
      I2PException - if the name cannot be resolved