-
April 7th, 2009, 12:37 PM
#1
Difference between createEngine and seekEngine
hi,
I've read the documentation and i have a doubt with createEngine and seekEngine.
I understand that createEngine works in the same way that seekEngine if already exists a master push-page with SHARE_SESSION especified in the creation of the engine , isn't it?
I explain it:
In every page I have, i use createEngine with SHARE_SESSION flag.
- the first page i load create the engine instance --> MASTER PUSH-PAGE
- in another window, i load another page that try to create the engine again , but doesn`t do it because the engine already exists --> this page use the current Engine instance --> PUSH-PAGE
In the second page, should I use seekEngine instead of createEngine?
-
April 8th, 2009, 09:42 AM
#2
You understand correctly,
so you can use "createEngine" with SHARE_SESSION in all your pages.
In fact, if your site is based on SHARE_SESSION, there is no need for "seekEngine".
Just note that all pages that call "createEngine" must define the "onEngineCreation" callback exactly in the same way and using "seekEngine" releaves you from this burden.
On the other hand, if your main page calls "createEngine" and specifies NEW_SESSION or FAIL instead of SHARE_SESSION as the "onSimilarEngineFound" argument,
then all other pages have to use "seekEngine" (here is the docs link, for other readers).
The latter policy may be needed if multiple instances of the main page can be opened but they can't share the same engine (for example, in case each instance of the main page allows the user to set a bandwidth constraint).
The use of the SHARE_SESSION flag allows Lightstreamer library to provide the "Engine Migration" feature, to recover the closing of the main window. This also does not depend on the use of "createEngine" or "seekEngine" on the other pages.
-
April 13th, 2009, 12:07 PM
#3
ok,
thank you very much for the explanation.
Similar Threads
-
By sebandres in forum Client SDKs
Replies: 1
Last Post: May 4th, 2011, 10:26 AM
-
By hungtt in forum General
Replies: 1
Last Post: January 4th, 2011, 01:07 PM
-
By ddhanis in forum Client SDKs
Replies: 1
Last Post: April 3rd, 2008, 04:08 PM
-
By smartboy in forum Client SDKs
Replies: 1
Last Post: January 23rd, 2007, 12:09 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 09:53 PM.
Bookmarks