private void requestStreamCompression ( String method ) { try { writer . write ( "<compress xmlns='http://jabber.org/protocol/compress'>" ) ; writer . write ( "<method>" + method + "</method></compress>" ) ; writer . flush ( ) ; } catch ( IOException e ) { notifyConnectionError ( e ) ; } }
Request the server that we want to start using stream compression . When using TLS then negotiation of stream compression can only happen after TLS was negotiated . If TLS compression is being used the stream compression should not be used .