Results 1 to 2 of 2
  1. #1
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784

    Hitting ESC stops streaming

    Hitting ESC (escape) button on a browser makes it stop downloading resources.
    This also affects Lightstreamer's streaming connection, so if you hit the ESC button while you're looking a Lightstreamer application you will see that the streaming connection closes down (btw note that the web client will try to recover the situation after a while opening a new connection).

    To avoid this problem on your application you should add a little piece of javascript that listen "esc" pressures and stops the bubbling of the event so that the streaming connection remains open. You can use this (or something equivalent):
    Code javascript:
    1. function checkEscape(e) {
    2.    if(!e) e = event;
    3.     if(e.keyCode == 27) {
    4.           return false;
    5.    }
    6. }
    7. document.onkeydown = checkEscape;
    8. document.onkeypress = checkEscape;
    We don't embed this script in our libraries cause you could think that when your user hits the esc button is cause he wants to close any open connection and so also Lightstreamer's.

    [Thanks to Zoran Perak for the hint]

  2. #2
    Member
    Join Date
    Sep 2006
    Location
    Oakland
    Posts
    13
    I find that both IE and Firefox go into the stalled state when I hit ESC, then they reconnect and revert to their normal streaming condition after that.

 

 

Similar Threads

  1. Streaming connections limit
    By Rakot in forum General
    Replies: 1
    Last Post: May 14th, 2010, 12:06 PM
  2. Streaming system is disconnected
    By ivailo in forum Client SDKs
    Replies: 2
    Last Post: December 1st, 2009, 01:07 PM
  3. Degrade from STREAMING to POLLING
    By riwang in forum Client SDKs
    Replies: 9
    Last Post: March 31st, 2009, 02:16 PM
  4. Pausing/Resuming Streaming
    By rakeshxp in forum Client SDKs
    Replies: 1
    Last Post: August 14th, 2007, 11:03 AM
  5. IE 6.0 options that can stop streaming
    By Waddy in forum Client SDKs
    Replies: 1
    Last Post: March 27th, 2007, 04:58 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 12:45 PM.