java.lang.Object
net.i2p.sam.SAMStreamSession.StreamSender
net.i2p.sam.SAMv2StreamSession.V2StreamSender
All Implemented Interfaces:
Runnable
Enclosing class:
SAMv2StreamSession

private class SAMv2StreamSession.V2StreamSenderextends SAMStreamSession.StreamSender
Thread sending the v2 stream data.
  • Field Details

    • _data

      private final List<ByteArray> _data
      The data chunks waiting to be sent.
    • _dataSize

      private int _dataSize
      Total bytes queued in the chunks.
    • _cache

      private final ByteCache _cache
      Cache supplying the chunk buffers.
    • _out

      private final OutputStream _out
      Stream the data is written to.
    • _stillRunning

      private volatile boolean _stillRunning
      True while the sender thread runs.
    • _shuttingDownGracefully

      private volatile boolean _shuttingDownGracefully
      True to drain the queue before closing.
    • runningLock

      private final Object runningLock
      Lock for the sender thread state.
  • Constructor Details

    • V2StreamSender

      public V2StreamSender(I2PSocket s, int id) throws IOException
      Builds the sender for one stream session.
      Parameters:
      s - the socket the data is written to
      id - the id of the session
      Throws:
      IOException - if the socket's output stream cannot be opened
  • Method Details