Please check now, I have commanded the connection sharing code and below code given in all the three page,
var protocolToUse = document.location.protocol != "file:" ? document.location.protocol : "
http:";
var portToUse = document.location.protocol == "
https:" ? "443" : "8080";
var lsClient = new Lightstreamer.LightstreamerClient(protocolToUse+"//mydomain.com:"+portToUse,"STOCKLIST_REMOTE");
lsClient.connectionOptions.setHttpExtraHeaders({"username" : "bullion"});
//lsClient.enableSharing(new Lightstreamer.ConnectionSharing("CommonConnection", "ATTACH", "CREATE"));
//lsClient.connectionOptions.setCookieHandlingRequired(true);
lsClient.addListener({
onStatusChange: function(newStatus) {
console.log(newStatus);
if(newStatus == "CONNECTED:HTTP-STREAMING"){
}else if(newStatus == 'DISCONNECTED:WILL-RETRY'){
}
}
});
lsClient.connect();
Now log shows like,
lightstreamer.subscriptions | INFO | 15:05:07,524 | 10] Subscribing subscription {[|Subscription|1|0||0|||] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:07,525 | 352] Subscription entered the active state {[|Subscription|5|0|1|1||2|] }
controllers.js:1704 displaycommodity(length): 1
controllers.js:56 loginstatus enter: true
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:07,543 | 273] Opening a new session and starting automatic reconnections. {}
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:07,547 | 66] Opening new session {[|SessionWS|false|false|1|0|8600|1|0|||false|false|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:07,574 | 191] Control requests queue is now empty {}
lightstreamer.js:556 lightstreamer.grids | INFO | 15:05:08,801 | 411] Cleaning the model {[|liveratelist|0|0|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:24,568 | 10] Subscribing subscription {[|Subscription|1|0||0|||] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:24,568 | 352] Subscription entered the active state {[|Subscription|5|0|1|1||2|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:24,572 | 10] Subscribing subscription {[|Subscription|1|0||0|||] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:24,573 | 352] Subscription entered the active state {[|Subscription|5|0|2|1||3|] }
controllers.js:56 loginstatus enter: true
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:24,582 | 273] Opening a new session and starting automatic reconnections. {}
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:24,587 | 66] Opening new session {[|SessionWS|false|false|1|0|7800|1|0|||false|false|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:24,610 | 191] Control requests queue is now empty {}
controllers.js:773 CONNECTING
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:24,960 | 247] Session started {[object Object] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,1 | 185] Stop sending reverse heartbeat to the server {[|ControlConnectionHandler|IDLE||50000|] }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:25,17 | 67] Binding session {[|SessionWS|false|false|4|3|7803|5|0|Sdf9c492f868f1580T0522581|[|WebSocketConnection|false|||false|]|false|false|] }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:25,19 | 241] Unable to establish session of the current type. Switching session type {WS Streaming prepare HTTP Streaming }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:25,26 | 244] Switching current session type {prepare HTTP Streaming }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,34 | 185] Stop sending reverse heartbeat to the server {[|ControlConnectionHandler|IDLE||50000|] }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:25,38 | 67] Binding session {[|SessionHTTP|false|false|4|1|7804|0|Sdf9c492f868f1580T0522581|false|false|] }
controllers.js:773 CONNECTED:STREAM-SENSING
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,84 | 186] New request to be sent to server {[|ControlConnectionHandler|IDLE||50000|] [object Object] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,94 | 189] Control request sent through HTTP connection {}
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,95 | 186] New request to be sent to server {[|ControlConnectionHandler|WAITING RESP|[|ControlRequestBatch|1|1|]|50000|] [object Object] }
controllers.js:773 CONNECTED:HTTP-STREAMING
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,789 | 192] Control request got answer {4 }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,802 | 353] Subscription is now subscribed to {[|Subscription|4|0|1|2|1|2|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:25,867 | 189] Control request sent through HTTP connection {}
lightstreamer.js:556 lightstreamer.grids | INFO | 15:05:25,873 | 411] Cleaning the model {[|liverates|0|0|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:26,194 | 192] Control request got answer {7 }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:26,216 | 353] Subscription is now subscribed to {[|Subscription|4|0|2|2|2|3|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:26,235 | 191] Control requests queue is now empty {}
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:27,996 | 10] Subscribing subscription {[|Subscription|1|0||0|||] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:27,997 | 352] Subscription entered the active state {[|Subscription|5|0|1|1||2|] }
controllers.js:1704 displaycommodity(length): 1
controllers.js:56 loginstatus enter: true
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:28,6 | 273] Opening a new session and starting automatic reconnections. {}
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:28,11 | 66] Opening new session {[|SessionWS|false|false|1|0|4200|1|0|||false|false|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:28,30 | 191] Control requests queue is now empty {}
controllers.js:1538 CONNECTING
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:28,367 | 247] Session started {[object Object] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:28,379 | 185] Stop sending reverse heartbeat to the server {[|ControlConnectionHandler|IDLE||50000|] }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:28,393 | 67] Binding session {[|SessionWS|false|false|4|3|4203|5|0|S3bd7056bf580c628T0525997|[|WebSocketConnection|false|||false|]|false|false|] }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:28,394 | 241] Unable to establish session of the current type. Switching session type {WS Streaming prepare HTTP Streaming }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:28,396 | 244] Switching current session type {prepare HTTP Streaming }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:28,401 | 185] Stop sending reverse heartbeat to the server {[|ControlConnectionHandler|IDLE||50000|] }
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:28,401 | 67] Binding session {[|SessionHTTP|false|false|4|1|4204|0|S3bd7056bf580c628T0525997|false|false|] }
controllers.js:1538 CONNECTED:STREAM-SENSING
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:28,426 | 186] New request to be sent to server {[|ControlConnectionHandler|IDLE||50000|] [object Object] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:28,446 | 189] Control request sent through HTTP connection {}
controllers.js:1538 CONNECTED:HTTP-STREAMING
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:29,187 | 192] Control request got answer {4 }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:29,201 | 353] Subscription is now subscribed to {[|Subscription|4|0|1|2|1|2|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:29,224 | 191] Control requests queue is now empty {}
lightstreamer.js:556 lightstreamer.grids | INFO | 15:05:29,231 | 411] Cleaning the model {[|liveratelist|0|0|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:33,53 | 10] Subscribing subscription {[|Subscription|1|0||0|||] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:33,53 | 352] Subscription entered the active state {[|Subscription|5|0|1|1||2|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:33,54 | 10] Subscribing subscription {[|Subscription|1|0||0|||] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:33,55 | 352] Subscription entered the active state {[|Subscription|5|0|2|1||3|] }
controllers.js:56 loginstatus enter: true
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:33,61 | 273] Opening a new session and starting automatic reconnections. {}
lightstreamer.js:556 lightstreamer.session | INFO | 15:05:33,66 | 66] Opening new session {[|SessionWS|false|false|1|0|1600|1|0|||false|false|] }
lightstreamer.js:556 lightstreamer.subscriptions | INFO | 15:05:33,85 | 191] Control requests queue is now empty {}