-
September 18th, 2014, 12:56 PM
#1
how the adapter sends a message to a specific client
Dears,
* My client app sends a message to the lightstreamer adapter. This message contains the username and password of the client. when the adapter receives the message, it check for this client authentication.
So i want my adapter able to send a message or data to this client after determining his authentication.
* I have another question. when the client opens a connection to LS and subscribe for items, Is the connection info and subscribe data as the adapter name,items and fields go over the network encrypted or no that it may be sniffed?
thanks
-
September 19th, 2014, 09:09 AM
#2
Hi engcoder,
* Please note that when creating a new Lightstreamer session, the Client can pass the Server some credential information (two generic strings can be used, conventionally named “user” and “password”).
The Server validates the credentials against the Metadata Adapter, that throws a specific exception if the validation fails otherwise the Lightstreamer session starts regularly.
That said, it is not strictly prohibited, start the session without specifying authentication credentials and send them later via a send_message request. In this case your MetaData Adapter,
in notifyUserMessage method, has the responsibility to bind the session with the specified user and take any required actions in case of authentication failure.
Now, soon after the connection succeeds (or the send_message succeeds) the way to go is to use a client-specific item upon which push message responses or data.
Client specific items can be easily handled by exploiting the getItems method: all the clients will create their subscription using the same item name, then the getItems method will customize the item name to make it unique per each client (see the example code in the getItems documentation). After that it will be up to the data adapter (that recive the Item name customized) to send the responses to the correct client;
* The data are encrypted if you use HTTPS connection. Please note that HTTPS is an optional feature in Lightstreamer Allegro edition and included in the Presto and Vivace editions.
Regards,
Giuseppe
Similar Threads
-
By engcoder in forum Client SDKs
Replies: 8
Last Post: August 26th, 2014, 09:25 AM
-
By mnenchev in forum Adapter SDKs
Replies: 5
Last Post: September 1st, 2009, 09:36 AM
-
By rsouissi in forum Client SDKs
Replies: 1
Last Post: May 28th, 2007, 05:33 PM
-
By vishnugs in forum General
Replies: 4
Last Post: April 6th, 2007, 11:06 AM
-
By rmusco in forum General
Replies: 8
Last Post: February 2nd, 2007, 05:29 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 12:45 AM.
Bookmarks