Results 1 to 2 of 2
  1. #1
    Power Member
    Join Date
    Sep 2013

    Remote adapter not connecting with my LS client in React native

    I have used below code to connect the LS client with LS server, but this always saying connection status as disconnected , this I have tried by using react native as client and java remote adapter,
    title: chenge URL and add confige to lightStreamer with react native / my lightStreamer status is DISCONNECTED after change URL and add user name confige Although i did change in (stockList,ADAPTER_SET,DATA_ADAPTER,FIELDS) and i chenged setupLightstreamerItemsSubscription function to

    setupLightstreamerItemsSubscription() {
    constmyClient = newLightstreamerClient(Constant.SERVER_ADDRESS, Constant.ADAPTER_SET) myClient.connectionOptions.setHttpExtraHeaders({"username" :"lmxwinbullliteapp"}) myClient.connectionOptions.setHttpExtraHeadersOnSessionCreationOnly(true) /* React class instance reference */constthat = this; myClient.addListener({ onStatusChange:function(newStatus) { console.log(newStatus); varsplittedStatus = newStatus.split(':'); that.setState({ status:splittedStatus.length === 2 ? Constant.STATUS_DECODE[splittedStatus[1]] : splittedStatus[0] }); } }); myClient.connect(); // return myClient-+constmySubscription = newSubscription("MERGE", Constant.ITEMS, Constant.FIELDS); mySubscription.setDataAdapter(Constant.DATA_ADAPTER); mySubscription.setRequestedSnapshot("yes"); mySubscription.addListener({ onSubscription:function() { console.log("SUBSCRIBED"); }, onUnsubscription:function() { console.log("UNSUBSCRIBED"); }, onItemUpdate:function(obj) { console.log("UPDATE FOR " + obj.getValue("stock_name")); that.updateState(obj) } }); myClient.subscribe(mySubscription); } componentDidMount() { this.eventEmitter = new EventEmitter(); this.setupLightstreamerItemsSubscription(); }

  2. #2
    Join Date
    Feb 2012
    Hi rvkvino,

    Could you get more details on the reason for the refusal to open a new session for the client?
    You could go through the server log, lightstreamer.log, looking for any refusal message, or you could add to the ClientListener of to the client code to log onServerError events to the console as well (

    In fact, a possible problem could be that the remote adapters are not actually connected and therefore not available.




Similar Threads

  1. Replies: 12
    Last Post: July 2nd, 2020, 05:01 PM
  2. React Native - MNP Module
    By kgstefan88 in forum Client SDKs
    Replies: 2
    Last Post: October 19th, 2017, 01:54 PM
  3. React-Native release build fails
    By kgstefan88 in forum Client SDKs
    Replies: 3
    Last Post: July 25th, 2017, 09:14 AM
  4. Replies: 5
    Last Post: August 20th, 2009, 10:38 AM
  5. Replies: 1
    Last Post: March 15th, 2007, 02:44 PM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 07:33 PM.