net.i2p.client

## Class ClientWriterRunner

- java.lang.Object
- - net.i2p.client.ClientWriterRunner

- All Implemented Interfaces:
    Runnable

       class ClientWriterRunner
      extends Object
      implements Runnable

  Copied from net.i2p.router.client We need a single thread that writes so we don't have issues with the Piped Streams used in InternalSocket.
  Author:
    zzz from net.i2p.router.client.ClientWriterRunner

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientWriterRunner(OutputStream out, I2PSessionImpl session)` starts the thread too

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMessage(I2CPMessage msg)` Add this message to the writer's queue
    `void` | `run()`
    `void` | `stopWriting()` No more messages - dont even try to send what we have

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

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

- - ### Constructor Detail

    - #### ClientWriterRunner

          public ClientWriterRunner(OutputStream out,
                            I2PSessionImpl session)

      starts the thread too

  - ### Method Detail

    - #### addMessage

          public void addMessage(I2CPMessage msg)

      Add this message to the writer's queue

    - #### stopWriting

          public void stopWriting()

      No more messages - dont even try to send what we have

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`