Hi Dario,
I have deploy the Lightstreamer server to another host which is different with the web server. The Lighstreamer server using the domain gts.vcb.com; while the web server using www.vcb.com. I set the domain using setDomain method and set the pushHost as follow:
Code:
var lsPage = new PushPage();
var debugAlerts = true;
var remoteAlerts = false;
var pushHost = null;
var pushPort = 3633;
debugAlerts = false;
remoteAlerts = true;
pushHost = "gts.vcb.com";
lsPage.context.setDomain("vcb.com");
lsPage.context.setDebugAlertsOnClientError(debugAlerts);
lsPage.context.setRemoteAlertsOnClientError(remoteAlerts);
lsPage.onEngineCreation = function(lsEngine) {
lsEngine.context.setDebugAlertsOnClientError(debugAlerts);
lsEngine.context.setRemoteAlertsOnClientError(remoteAlerts);
lsEngine.connection.setLSHost(pushHost);
lsEngine.connection.setLSPort(pushPort);
lsEngine.connection.setAdapterName("RBMS");
lsEngine.policy.setMaxBandwidth(200);
lsEngine.policy.setIdleTimeout(30000);
lsEngine.policy.setPollingInterval(10000);
//lsEngine.onStatusChange = ChangeWindowStatus;
lsEngine.changeStatus("STREAMING");
}
lsPage.bind();
lsPage.createEngine("HelloWorldApp","LS","SHARE_SESSION");
But the push page still having the connection problem. The browser's status bar shows "Lightstreamer is disconnected" and the server see no response. I am still wondering how to connect it with two different host. Please correct me if I'm wrong. Thank you.
Bookmarks