-
May 21st, 2014, 09:16 AM
#11
do you receive the call on the node adapter?
If not please verify if all the required configurations are set based on your case: https://docs.google.com/a/lightstrea...rive_web#gid=1
In some cases you'll see that <protected_js> set to N might be required (e.g. Different Hosts + Same Protocol + Cookie Require + Old Browser). I'm not sure if I can help you in these cases. Which browser are you testing with?
-
May 23rd, 2014, 04:43 AM
#12
Hi yes,
I am recieving the call just fine. Here is my code:
var HOST = 'localhost';
var METADATA_PORT = 6662;
var REQ_RESP_PORT = 6663;
var WRITE_PORT = 6664;
var reqRespStream = net.createConnection(REQ_RESP_PORT, HOST);
var notifyStream = net.createConnection(WRITE_PORT, HOST);
var metadataStream = net.createConnection(METADATA_PORT, HOST);
var MetadataProvider = require('lightstreamer-adapter').MetadataProvider,
DataProvider = require('lightstreamer-adapter').DataProvider,
dataProvider = new DataProvider(reqRespStream, notifyStream, function(){return true;}),
metadataProvider = new MetadataProvider(metadataStream,{
distinctSnapLen: 30,
itemAllowedModes: {distinct: true},
userAllowedModes: {distinct: true}
});
metadataProvider.on('notifyUser', function(request, response){
console.log('doneNotifyUser');
response.success(1000000,false);
});
doneNotifyUser is repeatedly logged to the console.
In the client the StatusWidget displays 'Connecting...' and i see the following logs repeatedly (as it keeps attempting to establish the session):
GET https://localhost/lightstreamer/create_session.js [HTTP/1.1 200 OK 7ms]
GET https://localhost/lightstreamer/create_session.js [HTTP/1.1 200 OK 4ms]
GET https://localhost/lightstreamer/xhr.html [HTTP/1.1 304 Not Modified 2ms]
Again, to be clear, if when the above is happening I simply remove the following line:
client.connectionOptions.setCookieHandlingRequired (true);
and refresh the cleint (without ever restarting my server or the lightstreamer server)
The LS client connects just fine.
I also added the following listener:
client.addListener({
onServerError:
function
(errorCode,errorMessage) {
console.log('Lightstreamer server error');
console.log(errorCode);
console.log(errorMessage);
}
});
but again i do not see any error messages logged from here.
So in summary, the problem seems very related to the line: client.connectionOptions.setCookieHandlingRequired (true);
When this is there I get the call in notifyUser but the subscription is never successful. When i remove this line without changing anything else the client connects perfectly.
As I mentioned with details in a previous post the only thing that is different in the request is the headers. They are different by more than just the cookie which is quite confusing.
Please let me know what you think I should try next?
my conf is as follows:
<use_protected_js>Y</use_protected_js>
<forward_cookies>Y</forward_cookies>
I am using the latest version of firefox: 29.0.1
-
May 26th, 2014, 09:59 AM
#13
regarding the document I linked (this one: http://goo.gl/kwREX ) which one is your case (ie your row)?
can you paste a snippet from the Lightstreamer server log?
Similar Threads
-
By milad.j in forum Adapter SDKs
Replies: 1
Last Post: November 4th, 2013, 09:23 AM
-
By cwt237 in forum Client SDKs
Replies: 6
Last Post: September 19th, 2013, 01:05 PM
-
By gal_nitzan in forum Adapter SDKs
Replies: 1
Last Post: February 12th, 2013, 09:16 PM
-
By eoinoc in forum Client SDKs
Replies: 1
Last Post: October 15th, 2012, 09:21 AM
-
By brianjohnson in forum Adapter SDKs
Replies: 2
Last Post: April 5th, 2010, 12:02 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:59 PM.
Bookmarks