Results 1 to 2 of 2

Thread: unsubscribe

  1. #1
    Member
    Join Date
    Mar 2007
    Location
    Boston
    Posts
    26

    unsubscribe

    After user establishes the connection and subscribes one or more items, if user closes browser or user's machine crashes, what event will be sent to Lightstreamer server? And what APIs for MetadataAdapter & DataAdapter will be called on server and in what sequence?
    Thanks

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    If the browser operation is interrupted abruptly, the Server will only see that the streaming connection is broken; hence, it will close the Session in short time, as soon as it tries to write something (possibly a keepalive packet).
    In principle, it is possible that an intermediate node keeps the connection open even if the browser has closed (and becomes itself the client, on behalf of the browser). We currently don't handle this case and the Server keeps streaming until the content-length is consumed, but it doesn't seem to be a common case.

    If the browser is interrupted while no request is under processing (for instance, in polling mode, between two subsequent polls), the Server is totally unaware and will keep waiting for a client action and will close the Session after the related timeout.

    Upon session closing, notifySessionClosed is invoked on the Metadata Adapter.
    If wantsTablesNotifications had returned true for that session, then notifyTablesClose is also invoked, before notifySessionClosed, once for each currently subscribed table.
    If the involved unsubscriptions cause some item not to be requested by any client, then unsubscribe is also issued to the Data Adapter for each of them. All the latter calls are concurrent with one another and with respect to the Metadata Adapter calls.

 

 

Similar Threads

  1. IE - unexpected unsubscribe
    By shayzweig in forum Client APIs
    Replies: 3
    Last Post: April 6th, 2010, 09:46 AM
  2. unsubscribe by itself intermittenly
    By ddhanis in forum Client APIs
    Replies: 1
    Last Post: May 21st, 2009, 10:54 AM
  3. unsubscribe
    By jamesclinton in forum Adapter APIs
    Replies: 2
    Last Post: March 14th, 2007, 08:04 AM

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 07:28 PM.