Simone
Hello,
is there a way to go back to a 'stream' connection after the LS client library switched to a polling connection? I simulated a network problem (actually I just set a breakpoint and waited...) and the client library, after resuming, switched to the polling mode (since the enableStreamSense was set to YES). I started to get a lot of binding_session, that actually simulate a stream connection, but how long the polling mode will continue? Does the LS client library have the ability to detect that the network is functioning correctly and switch, automatically, from polling mode to the stream again?
Thank you
gianluca.bertani
Hello Simone,
this behavior changed with client library versions. Assuming you are talking about the native iOS client library, up to version 1.4.x it switches back to a streaming connection only if a connection error (or timeout) occurs while polling. The rationale here is that you want to keep a stable connection, whatever algorithm it is using, unless there is a clear signal that the underlying network may have changed.
Beginning with the Unified Client API version, i.e. from version 2.0.x, it switches back to a streaming connection also if it detects that its client IP address has changed (the client IP is reported by the Server when the session is bound). Again, this is another signal that the underlying network has changed.
Let us know if you need more information.
Best regards,
Gianluca