Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    May 2018
    Location
    Athens, Greece
    Posts
    5

    Force session to stop receive data after some time for previously subscribed item

    Hello,

    I am trying to find more information on documentation for how to implement the following scenario without any luck.

    My client is written in JavaScript and my server in .NET, and so I use the .net adapter.

    A user connects with the LS server and tries to subscribe, let say to ItemA and ItemB. The ItemA subscription is allowed by default for all users, the ItemB is allowed because this user have bought a premium service for 30 minutes.

    After 30 minutes, user must continue to receive data for ItemA and stop receive data for ItemB. The web client should not hard-refresh (preferably not even change the session) and server must not send to this session data for ItemB, even if client has not made any action (client handler has crashed)

    Note that many users are connected to both tables if that matters.

    So, my questions are:

    • How my server can stop transmit data for a table to a specific session?
    • How my server can force a session to disconnect?
    • What functions should I use from the .net adapter?

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    499
    Hi cgeo,

    I can confirm that you can not stop or remove a single subsciption from your adapter.
    In a case like this you should force the termination of entire session.
    Please refer to this post for a discussion of the solutions avaliable for this purpose: https://forums.lightstreamer.com/sho...on-termination

    Furthermore, if you want to avoid that this operation affected also the data flow for ItemA, you should use two different (and non-sharing) client session.
    In order that your adapter close only the client session involved in ItemB subscription but updates for ItemA will not have any repercussion.

    Please let us know if you need any further clarifications.

    Regards,
    Giuseppe

  3. #3
    Member
    Join Date
    May 2018
    Location
    Athens, Greece
    Posts
    5
    Thank you for your reply.
    I had already read the thread you mention, but the links are broken.

    If I close the session, as you suggest, should I use the "Session Destroy Request" p:36 of https://lightstreamer.com/docs/clien...ifications.pdf ?

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    499
    Hi cgeo,

    Sorry for the broken link, please refer here: https://forums.lightstreamer.com/sho...ction/page2#13
    Anyway, yes I confirm that your adapter should issue a Session Destroy Request.

    Regards,
    Giuseppe

 

 

Similar Threads

  1. Replies: 9
    Last Post: November 7th, 2017, 03:09 PM
  2. Can I receive the original data?
    By Johnny in forum Client APIs
    Replies: 10
    Last Post: September 13th, 2010, 11:06 AM
  3. Replies: 1
    Last Post: June 7th, 2010, 11:13 AM
  4. Client receive old data after some time.
    By mnenchev in forum General
    Replies: 3
    Last Post: November 25th, 2009, 02:27 PM
  5. Adding/Removing item in subscribed group
    By rsouissi in forum Adapter APIs
    Replies: 4
    Last Post: January 10th, 2007, 06:11 PM

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