Results 1 to 3 of 3
  1. #1

    get and process data from server

    now the connection to server is established, I am trying to get data from server.
    how to do that ?


    LSClient c = new LSClient();
    c.OpenConnection(connInfo, new RzConnectionListener() );

    string item = "SecurityDetail."+"1001";
    ExtendedTableInfo tableInfo = new ExtendedTableInfo(
    new String[] {"SecurityDetail."+"1001" },
    "COMMAND",
    new String[] { "CUSIP", "Description", "ISWI", "MaturityDate", "IssueDate", "BenchmarkType" },
    true);
    tableInfo.DataAdapter = "STATICDATA_ADAPTER";

    SubscribedTableKey tableRef = c.SubscribeTable(tableInfo, new RzTableListener(), true); //TODO

    。。。。。。

  2. #2
    Quote Originally Posted by emmajyu View Post
    now the connection to server is established, I am trying to get data from server.
    how to do that ?


    LSClient c = new LSClient();
    c.OpenConnection(connInfo, new RzConnectionListener() );

    string item = "SecurityDetail."+"1001";
    ExtendedTableInfo tableInfo = new ExtendedTableInfo(
    new String[] {"SecurityDetail."+"1001" },
    "COMMAND",
    new String[] { "CUSIP", "Description", "ISWI", "MaturityDate", "IssueDate", "BenchmarkType" },
    true);
    tableInfo.DataAdapter = "STATICDATA_ADAPTER";

    SubscribedTableKey tableRef = c.SubscribeTable(tableInfo, new RzTableListener(), true); //TODO

    。。。。。。

    I have inherited
    TableListener
    ConnectionListener.

    I can see the connection listener's function output, such as connection establed, session streaming start, connection close etc.
    And I guess the data I request from server should be grabing from the TableListener class. But I tried various function, and seems they dont get call at all.
    Can you please help?
    Many thanks!

  3. #3
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    718
    Hi emmajyu,

    Yes, you are right, you should receive updates from the server in the OnUpdate() method of your implementation of IHandyTableListener (in your case RzTableListener).
    Please can you confirm me that even with a minimal implementation of this method you do not get any result? You have tried something like this:

    Code:
    public void OnUpdate(int itemPos, string itemName, IUpdateInfo update) {
                Console.WriteLine("Received update for: " + itemPos);
    }
    and do not see anything in the console?

    If so, you should verify the correctness of the Subscribe executed, for example, if the names of Item or of the fields are correct, or if the subscription mode (in your case COMMAND) is allowed by the particular Item required.

    In this case it would be appropriate to do a check on the server logs to verify any warning or error report. Can you have a feedback from the log of the Lightstreamer server?

    Regards,
    Giuseppe

 

 

Bookmarks

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 11:37 PM.
Lightstreamer Logo