@Override
    public boolean hasBytesBuffered() {
        return hasBytesBuffered;
    }
Perform handshake wrap after an SSLException or any IOException.

If `doWrite=false`, we are processing IOException after peer has disconnected, so we
cannot send any more data. We perform any pending wraps so that we can unwrap any
peer data that is already available.

If `doWrite=true`, we are processing SSLException, we perform wrap and flush
any data to notify the peer of the handshake failure.

Returns true if no more wrap is required and any data is flushed or discarded.
clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java