I have used the following code to connect the LightStreamer.
$wnd.page = new $wnd.PushPage();
$wnd.page.context.setDomain("www.MyCompany.com");
$wnd.page.onEngineCreation = function(engine) {
$wnd.lsEngine = engine;
engine.connection.setLSHost("push.MyCompany.com");
engine.connection.setLSPort("9090");
engine.connection.setAdapterName("BrowserToLSToTWS");
engine.connection.setUserName(username);
engine.connection.setPassword(password);
It works fine while my host file have the following entry
127.0.0.1
www.MyCompany.com
127.0.0.1 push.MyCompany.com
Now I try to launch the same application on my client Machine with the following code
$wnd.page = new $wnd.PushPage();
$wnd.page.context.setDomain("ClientCompanyName.co.ke");
$wnd.page.onEngineCreation = function(engine) {
$wnd.lsEngine = engine;
engine.connection.setLSHost("push.Servername.ClientCompanyName.co.ke");
engine.connection.setLSPort("9090");
engine.connection.setAdapterName("BrowserToLSToTWS");
engine.connection.setUserName(username);
engine.connection.setPassword(password);
where my client web server name and host name as follows
WebServerName : ClientCompanyName.co.ke
HostName : push.Servername.ClientCompanyName.co.ke
Now I try to browse the application. I can’t connect with the LS. But once I put the Host file entries like ..
<ClientIP> ClientCompanyName.co.ke
<ClientIP> push.Servername.ClientCompanyName.co.ke
Then it connect with LS.
Where I am wrong and where do I need to code for this case?
Kindly help me to solve this prob.