René Lache
René Lache

Reputation: 29

Lightstreamer Eventhandler in Win Forms

My question may sound very stupid (eventually it is^^) but I try to get an Lightstreamer stream in a WinForm Project. Client, Listener etc is successfully build.

IgStreamingApiClient R2D2 = new IgStreamingApiClient(_authenticationResponse);
CustomClientListener Dax = new CustomClientListener();
MarketListener DaxMarkt = new MarketListener();

My question is, in which part of the code do I run the stream, because I can't fetch any data.

List<string> Markets = new List<string>();
Markets.Add("IX.D.DAX.IFMM.IP");
R2D2.Connect(Dax);
R2D2.SubscribeToMarketUpdates(DaxMarkt, Markets);

Should I do a while(sendData=true)? Is there any magical Databinding? I have no clue where to get the item updates, maybe some of you could give me a hint.

Upvotes: 1

Views: 81

Answers (1)

Giuseppe Corti
Giuseppe Corti

Reputation: 101

You should leverage the proper callback of the listener you used to subscribe (DaxMarkt). Indeed, I expect that the MarketListener is a custom implementation of the SubscriptionListener interface; with the method onItemUpdate (or something similar) set up to receive updates in real time from the market.

Upvotes: 0

Related Questions