SlavkoParezanin
Hi,
We are developing Subscription Listener for our Grid using Knockout.
Here is the flow of ordinary work with LS:
1) we do Subscribe()
a) we get event OnSubscription
b) we get many events ADD (initial set)
c) we get event OnEndOfSnapshot
When I unplug my network cable
- we get event OnUnsubscribe
LightstreamerClient is trying to re-connect.
We get onStatusChange events.
After i plug network cable in again, we again get everything
a) we get event OnSubscription
b) we get many events ADD (initial set)
c) we get event OnEndOfSnapshot
without calling Subscribe() explicitely.
It is normal because we could have new items or updates of items in that period.
I am also following two events more:
- onSubscriptionError
- onUnsubscription
I recognize "disconnected" when i get OnSubscription, without issuing Subscribe() previosly.
Question:
How can we distinguish the cases
1) disconnected for short period (network latencies)
2) disconnected for long period (session and subscription objects are destroyed at LS server)
?
We have to recognize other cases also:
- unactive for long period (session interrupted)
- restart of the page
- restart of Light Streamer
- all events above but when user is connected on another browser or machine
Best Regards,
Slavko Parezanin