Jump to content

Recommended Posts



Yes, websocket connections are supported. 


There could be a number of reasons why you're unable to connect - for example, it could be your firewall blocking websocket connections. Can you test by connecting from outside your corporate network?


Kind Regards,


Share this post

Link to post
Here is a snippet of code that I am testing with.  It works for the 2nd uri but Lightstreamer does not require wss so I do not set the credentials either.

This is partially working for CityIndex.  By partially, I mean that I have used Wireshark and I see it performing the WSS handshake negotiation.

I am getting an error back that the socket was forcibly closed.  I am guessing that it might have something to do with the way I am sending the credentials.


            WS = new ClientWebSocket();


            WS.Options.Credentials = new NetworkCredential("my real username", "my session id from REST logon");

            CancellationToken token = new CancellationToken();

            await WS.ConnectAsync(uri, token);


Any suggestions or ideas?

Share this post

Link to post

It's highly unlikely, but as a check youhave a Live account and not a pre-production account?


Unfortunately, I don't have expertise in coding/development so cannot comment on your code snippet, however the dummy credentials you indicated would be the correct ones to send.

Share this post

Link to post

So I am guessing that my account in a live acct (but it is not a real acct no funds).

If I try to hit pre prod, I get the following

  "AdditionalInfo": null,
  "StatusCode": 2,
  "HttpStatus": 401,
  "ErrorMessage": "Sorry, your login has failed|This is because your login credentials do not match our records.",
  "ErrorCode": 4010
If I hit production, I get
  "Session": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "PasswordChangeRequired": false,
  "AllowedAccountOperator": false,
  "StatusCode": 1,
  "AdditionalInfo": null


Share this post

Link to post

So I think I see the issue. 

When I try to upgrade my connection to a websocket this is the message I am getting back.


HTTP/1.1 403 Forbidden
Server: Lightstreamer/5.1.1 build 1623.2 (Lightstreamer Push Server - www.lightstreamer.com) Vivace edition
Content-Type: text/plain; charset=iso-8859-1
Date: Sat, 8 Apr 2017 17:31:42 CEST
Content-Length: 36
Connection: close
Subprotocols specified not supported
I finally noticed that it said  Lightstreamer/5.1.1 build 1623.2.
I can not find any documentation for that version. However, I did find documentation for 5.1.2 which is very close :)
When I look at that documentation, it does not appear that version supports websockets.
I also noticed on this page http://www.lightstreamer.com/download/#ls5 it has the following alert on the page
 Lightstreamer Server 5.x is no more supported.
You are strongly encouraged to upgrade to Lightstreamer Server 6.x.
It looks like 6.1.0 (released Jan 23, 2017) is the 1st version that supports websockets.  I won't swear to it. It is just the 1st version that I found it in the SDK Client Generic documentation.
So I think the question becomes is there a server upgrade planned.  If it is planned can you give me any indication of when that upgrade might be performed?
I know you said earlier that websockets was supported, so maybe I am not reading the documentation properly.  If it is supported for version 5.1.1, can you point me to any documentation for that version?

Share this post

Link to post



I have found that there is another websocket protocol (js.lightstreamer.com).  I did not find it in the official documentation, so I am not sure about coding to it. I would have to reverse engineer it without some more info. I have been able to connect to a websocket. Now I have to start looking at the subscriptions and decoding the published messages now.  Let me know if you find any documentation.


I am hoping that the plan is to upgrade to the latest version.


Let me know what you find on your side.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now