Results 1 to 2 of 2
  1. #1

    Custom Subscription Listener and Disconnections

    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
    Last edited by Slavko Parezanin; March 18th, 2014 at 10:05 AM.

  2. #2
    Actually we solved it.
    I recognized "disconnected" when i get OnSubscription, without issuing Subscribe() previously.
    LS Subscription object is able to recover itself after disconnected.

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 08:23 AM.