Package org.apache.ignite.internal.client.thin.io

## Interface ClientConnection

All Superinterfaces:
  `AutoCloseable`

    public interface ClientConnection
    extends AutoCloseable

Client connection: abstracts away sending and receiving messages.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `close()` Closes the connection.
`@Nullable InetSocketAddress` `localAddress()` Gets local address of this session.
`@Nullable InetSocketAddress` `remoteAddress()` Gets address of remote peer on this session.
`void` `send​(ByteBuffer msg, @Nullable Runnable onDone)` Sends a message.

### Method Detail

#### send

    void send​(ByteBuffer msg,
              @Nullable
              @Nullable Runnable onDone)
       throws IgniteCheckedException

Sends a message.

Parameters:
  `msg` - Message buffer.
  `onDone` - Callback to be invoked when asynchronous send operation completes.
Throws:
  `IgniteCheckedException`

#### localAddress

    @Nullable
    @Nullable InetSocketAddress localAddress()

Gets local address of this session.

Returns:
  Local network address or `null` if non-socket communication is used.

#### remoteAddress

    @Nullable
    @Nullable InetSocketAddress remoteAddress()

Gets address of remote peer on this session.

Returns:
  Address of remote peer or `null` if non-socket communication is used.

#### close

    void close()

Closes the connection.

Specified by:
  `close` in interface `AutoCloseable`