private IllegalStateException closingException() {
        throw new IllegalStateException("Channel is in closing state");
    }
Performs SSL handshake, non blocking.
Before application data (kafka protocols) can be sent client & kafka broker must
perform ssl handshake.
During the handshake SSLEngine generates encrypted data that will be transported over socketChannel.
Each SSLEngine operation generates SSLEngineResult , of which SSLEngineResult.handshakeStatus field is used to
determine what operation needs to occur to move handshake along.
A typical handshake might look like this.
+-------------+----------------------------------+-------------+
|  client     |  SSL/TLS message                 | HSStatus    |
+-------------+----------------------------------+-------------+
| wrap()      | ClientHello                      | NEED_UNWRAP |
| unwrap()    | ServerHello/Cert/ServerHelloDone | NEED_WRAP   |
| wrap()      | ClientKeyExchange                | NEED_WRAP   |
| wrap()      | ChangeCipherSpec                 | NEED_WRAP   |
| wrap()      | Finished                         | NEED_UNWRAP |
| unwrap()    | ChangeCipherSpec                 | NEED_UNWRAP |
| unwrap()    | Finished                         | FINISHED    |
+-------------+----------------------------------+-------------+

@throws IOException if read/write fails
@throws SslAuthenticationException if handshake fails with an {@link SSLException}
clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java