net.i2p.sam

## Class SAMv2StreamSession.SAMv2StreamSessionSocketReader

- java.lang.Object
- - net.i2p.sam.SAMStreamSession.SAMStreamSessionSocketReader
  - - net.i2p.sam.SAMStreamSession.SAMv1StreamSessionSocketReader
    - - net.i2p.sam.SAMv2StreamSession.SAMv2StreamSessionSocketReader

- All Implemented Interfaces:
    Runnable
  Enclosing class:
    SAMv2StreamSession

      public class SAMv2StreamSession.SAMv2StreamSessionSocketReader
      extends SAMStreamSession.SAMv1StreamSessionSocketReader

  SAM STREAM socket reader, running in its own thread. It forwards forward data to/from an I2P socket.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected long` | `limit`
    `protected boolean` | `nolimit`
    `protected long` | `totalReceived`

    - ### Fields inherited from class net.i2p.sam.SAMStreamSession.SAMStreamSessionSocketReader

      `i2pSocket, id, runningLock, stillRunning`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAMv2StreamSessionSocketReader(I2PSocket s, int id)` Create a new SAM STREAM session socket reader

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()`
    `void` | `setLimit(long limit, boolean nolimit)`

    - ### Methods inherited from class net.i2p.sam.SAMStreamSession.SAMv1StreamSessionSocketReader

      `stopRunning`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### limit

          protected long limit

    - #### nolimit

          protected boolean nolimit

    - #### totalReceived

          protected long totalReceived

  - ### Constructor Detail

    - #### SAMv2StreamSessionSocketReader

          public SAMv2StreamSessionSocketReader(I2PSocket s,
                                                int id)
                                         throws IOException

      Create a new SAM STREAM session socket reader
      Parameters:
        `s` - Socket to be handled
        `id` - Unique id assigned to the handler
      Throws:
        `IOException`

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `SAMStreamSession.SAMv1StreamSessionSocketReader`

    - #### setLimit

          public void setLimit(long limit,
                               boolean nolimit)