All Implemented Interfaces:
Runnable

class InternalSocketRunnerextends I2PAppThread
Listens for in-JVM connections on internal socket.
  • Field Details

    • client

      private final I2PTunnelClientBase client
      The tunnel client the socket serves.
    • port

      private final int port
      The local port being listened on.
    • label

      private final String label
      Name shown in the logs for this tunnel.
    • ss

      private ServerSocket ss
      The listening socket, null once closed.
    • open

      private volatile boolean open
      False once the socket has been closed.
  • Constructor Details

    • InternalSocketRunner

      InternalSocketRunner(I2PTunnelClientBase client)
      Does not start the runner, caller must call start().
      Parameters:
      client - the tunnel client that handles each socket accepted internally
    • InternalSocketRunner

      InternalSocketRunner(I2PTunnelClientBase client, String label)
      Does not start the runner, caller must call start().
      Parameters:
      client - the tunnel client that handles each socket accepted internally
      label - service name shown for this port on the debug page
  • Method Details

    • run

      public final void run()
      Accepts internal sockets in a loop until closed, handing each to the tunnel client.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class I2PThread
    • stopRunning

      void stopRunning()
      Stop the server socket and mark as closed.