Package net.dona.doip.client.transport

## Interface DoipExchange

- All Superinterfaces:
    `java.lang.AutoCloseable`

      public interface DoipExchange
      extends java.lang.AutoCloseable

  An object representing both the outgoing request input, and the response, of a DOIP connection. This allows the writing of segments to the request input to be interspersed with reading segments from the response.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` |
    `OutDoipMessage` | `getRequestOutgoingMessage()` | Returns an instance of `OutDoipMessage` to which segments of the request input can be written.
    `DoipClientResponse` | `getResponse()` | Returns the response from the server.

- - ### Method Detail

    - #### getResponse

          DoipClientResponse getResponse()
                                  throws java.io.IOException

      Returns the response from the server. This method will block until the initial segment of the response is available; in general it may be necessary to write some or all request input using `getRequestOutgoingMessage()` before this method will return.
      Returns:
        the response from the server
      Throws:
        `java.io.IOException`

    - #### getRequestOutgoingMessage

          OutDoipMessage getRequestOutgoingMessage()

      Returns an instance of `OutDoipMessage` to which segments of the request input can be written.
      Returns:
        an instance of `OutDoipMessage` to which segments of the request input can be written

    - #### close

          void close()

      Specified by:
        `close` in interface `java.lang.AutoCloseable`