net.i2p.client.streaming

## Interface MessageOutputStream.WriteStatus

- All Known Implementing Classes:
    PacketLocal
  Enclosing class:
    MessageOutputStream

      public static interface MessageOutputStream.WriteStatus

  Define a way to detect the status of a write

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `waitForAccept(int maxWaitMs)` Wait until the data written is accepted into the outbound pool, (i.e.
    `void` | `waitForCompletion(int maxWaitMs)` Wait until the data written either fails or succeeds.
    `boolean` | `writeAccepted()` the write was accepted.
    `boolean` | `writeFailed()` did the write fail?
    `boolean` | `writeSuccessful()` did the write succeed?

- - ### Method Detail

    - #### waitForCompletion

          void waitForCompletion(int maxWaitMs)

      Wait until the data written either fails or succeeds. Success means an ACK FROM THE FAR END.
      Parameters:
        `maxWaitMs` - -1 = forever

    - #### waitForAccept

          void waitForAccept(int maxWaitMs)

      Wait until the data written is accepted into the outbound pool, (i.e. the outbound window is not full) which we throttle rather than accept arbitrary data and queue
      Parameters:
        `maxWaitMs` - -1 = forever

    - #### writeAccepted

          boolean writeAccepted()

      the write was accepted. aka did the socket not close?

    - #### writeFailed

          boolean writeFailed()

      did the write fail?

    - #### writeSuccessful

          boolean writeSuccessful()

      did the write succeed?