Results 1 to 10 of 17

Hybrid View

  1. #1
    Senior Member
    Join Date
    Sep 2007
    Location
    des plaines
    Posts
    41
    Yes, I did that, compiler did not ask for other functions. But I haven't tested sending message yet.

    This is the code from HelloWorld .Net adapter sample:
    public void Run()
    {
    go = true;
    int c = 0;
    Random rand = new Random();

    while (go)
    {
    IDictionary eventData = new Hashtable();
    eventData["message"] = c % 2 == 0 ? "Hello" : "World";
    eventData["timestamp"] = DateTime.Now.ToString("s");
    _listener.Update("greetings", eventData, false);
    c++;
    Thread.Sleep(1000 + rand.Next(2000));
    }
    }

    This while loop. Does LS need it or it just mimics a constant data feed?

    Thanks

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    hi,

    that code just publishes an update each 1000 + rand.Next(2000) milliseconds.
    Lightstreamer doesn't need such loop, you should implement your own logic to send updates related to your feed

    HTH

 

 

Similar Threads

  1. Don't send message when refresh the browser
    By naitsir in forum Client SDKs
    Replies: 7
    Last Post: October 2nd, 2012, 10:36 AM
  2. How to send message to each client?
    By hungtt in forum Adapter SDKs
    Replies: 7
    Last Post: December 30th, 2010, 03:42 AM
  3. Replies: 9
    Last Post: October 19th, 2009, 04:02 PM
  4. How to send params from client to server
    By kanibal210 in forum Client SDKs
    Replies: 1
    Last Post: September 30th, 2009, 08:36 AM

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:17 AM.