java.lang.Object
net.i2p.sam.MasterSession.StreamAcceptor
All Implemented Interfaces:
Runnable
Enclosing class:
MasterSession

private class MasterSession.StreamAcceptorextends Object implements Runnable
Acceptor thread that waits for incoming I2P streaming connections and dispatches them to the appropriate subsession by matching the local port to the subsession's listen port. If no exact match is found, falls back to a subsession listening on port 0 (any port).

Each accepted socket is offered to the subsession's queue via SAMv3StreamSession.queueSocket(I2PSocket). If the queue is full (the PHP client is not keeping up), the socket is reset and an overflow is logged (rate-limited to avoid flooding).

Runs for the lifetime of the master session; stopped by MasterSession.close().

  • Field Details

    • stop

      private volatile boolean stop
      True to end the accept loop.
  • Constructor Details

    • StreamAcceptor

      public StreamAcceptor()
      Creates the stream acceptor.
  • Method Details

    • stopRunning

      public void stopRunning()
      Stops accepting new stream connections.
    • run

      public void run()
      Specified by:
      run in interface Runnable