@Override
    public Optional<String> getCipherSuiteName() {
        SslHandler sslhandler = (SslHandler) channelHandlerContext.channel().pipeline().get(SSL_HANDLER_NAME);
        if (sslhandler == null) {
            return Optional.empty();
        }
        return Optional.ofNullable(sslhandler.engine().getSession().getCipherSuite());
    }
Flag that specifies if the connection should be considered closed. Closing a NIO connection
is an asynchronous operation so instead of waiting for the connection to be actually closed just
keep this flag to avoid using the connection between #close was used and the socket is actually
closed.
xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java