private boolean flushNetOutBufferAndUpdateInterestOps() throws IOException {
        boolean flushedCompletely = flushNetOutBuffer();
        if (flushedCompletely) {
            transportLayer.removeInterestOps(SelectionKey.OP_WRITE);
            if (pendingSaslState != null)
                setSaslState(pendingSaslState);
        } else
            transportLayer.addInterestOps(SelectionKey.OP_WRITE);
        return flushedCompletely;
    }
Sends a SASL client token to server if required. This may be an initial token to start
SASL token exchange or response to a challenge from the server.
@return true if a token was sent to the server
clients/src/main/java/org/apache/kafka/common/security/authenticator/SaslClientAuthenticator.java