java.lang.Object
net.i2p.sam.SAMStreamSession.SAMStreamSessionSocketReader
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
SAMStreamSession.SAMv1StreamSessionSocketReader
Enclosing class:
SAMStreamSession

public static class SAMStreamSession.SAMStreamSessionSocketReaderextends Object implements Runnable
Reads bytes off one tunnel socket and pushes them to the SAM client.
  • Field Details

    • i2pSocket

      protected final I2PSocket i2pSocket
      The tunnel socket this reader drains.
    • runningLock

      protected final Object runningLock
      Guards the run loop's state against a concurrent stop.
    • stillRunning

      protected volatile boolean stillRunning
      Guarded by runningLock; cleared on stop.
    • id

      protected final int id
      Stream id for this reader.
  • Constructor Details

    • SAMStreamSessionSocketReader

      public SAMStreamSessionSocketReader(I2PSocket s, int id)
      Create a new SAM STREAM session socket reader.
      Parameters:
      s - Socket to be handled
      id - Unique id assigned to the handler
  • Method Details

    • stopRunning

      public void stopRunning()
      Stop a SAM STREAM session socket reader thread immediately.
    • run

      public void run()
      Run the socket reader loop.
      Specified by:
      run in interface Runnable