powered by Jive Software

Exposing stream resumption information from TCP connection

We are writing an Android app using Smack. We would like to be able to use stream resumption after the app has been restarted to save bandwidth, but currently all the stream management information is private to the connection (so the app cannot save this information).

We want to provide methods on the connection so that the app can get the stream management state from the connection and save it before the app is killed. We then want to provide this information to the Connection configuration so that the new connection picks up the stream management information and uses it when connecting to the server.

Does this sound like a reasonable change?

Well, that is not entirely true, is it? There is such a thing as reflection.

No, I would suggest to put the effort into using MAM instead.

We are wanting to use stream resumption to reduce the amount of data used by our app, and reduce the load on our server.

With the direction Android is taking in stopping apps while they are in the background, and killing app’s network connections, we are expecting to disconnect from the server very often, and reducing the load on the server when we reconnect is important to us. As the app may also be killed, we cannot rely on data that is stored in memory for stream resumption. This is why we are trying to access the stream resumption state from smack.