net.i2p.router.client

## Class ClientWriterRunner

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

- All Implemented Interfaces:
    Runnable

      class ClientWriterRunner
      extends Object
      implements Runnable

  Async writer class so that if a client app hangs, it won't take down the whole router with it (otherwise the JobQueue would block until the client reads from their i2cp socket, causing all sorts of bad things to happen) For external I2CP connections only.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientWriterRunner(RouterContext context, ClientConnectionRunner runner)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMessage(I2CPMessage msg)` Add this message to the writer's queue Nonblocking, throws exception if queue is full
    `void` | `run()`
    `void` | `stopWriting()` No more messages - don't 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(RouterContext context,
                                    ClientConnectionRunner runner)

  - ### Method Detail

    - #### addMessage

          public void addMessage(I2CPMessage msg)
                          throws I2CPMessageException

      Add this message to the writer's queue Nonblocking, throws exception if queue is full
      Throws:
        `I2CPMessageException`

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### stopWriting

          public void stopWriting()

      No more messages - don't even try to send what we have