private void sendStreamFeatures() {
        final Element features = DocumentHelper.createElement(QName.get("features", "stream", "http://etherx.jabber.org/streams"));
        if (saslStatus != SASLAuthentication.Status.authenticated) {
            // Include available SASL Mechanisms
            final Element saslMechanisms = SASLAuthentication.getSASLMechanisms(session);
            if (saslMechanisms != null) {
                features.add(saslMechanisms);
            }
        }
        // Include Stream features
        final List<Element> specificFeatures = session.getAvailableStreamFeatures();
        if (specificFeatures != null) {
            for (final Element feature : specificFeatures) {
                features.add(feature);
            }
        }
        connection.deliverRawText(features.asXML());
    }
A {@link org.jivesoftware.openfire.net.StanzaHandler} that is able to process the specific framing that is used by
clients connecting via websockets.

@author Guus der Kinderen, guus@goodbytes.nl
@see <a href="https://www.rfc-editor.org/rfc/rfc7395.html">RFC 7395:  An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket</a>
xmppserver/src/main/java/org/jivesoftware/openfire/websocket/WebSocketClientStanzaHandler.java