nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Dec 2, 2004 09:08 AM
Msg. 1 of 3
Having some troubles. I'm using modified code based on the C++ Watchlist example, here's a snippet from StartStreaming():
m_soc.Send(request, sizeof(request)-1); //Get quotes, this works fine
char Regional[100]; memset(Regional, 0x00, sizeof(Regional)); strcpy(Regional, "S,REGON,QQQQ\n"); m_soc.Send(Regional, sizeof(Regional)-1);
Questions:
1. Am I doing something obviously wrong? 2. I'm assuming I should see messages being delivered to same same HandleMessage function as "Q" quote updates, but regional message should begin with "R". Am I mistaken? 3. I can't find anything in the API on GetLastError() or the return codes. Is this documented somewhere?
|
DTN_Tim_Russell
-IQ Server Developer-
Posts: 41
Joined: May 3, 2004
DTN Market Access, LLC.
|
Posted: Dec 3, 2004 09:54 AM
Msg. 2 of 3
Shouldn't those sizeof()'s be strlen()'s? Just wondering, not sure how IQFeed will respond to all those extraneous nulls.
Tim Russell Software Engineer DTN IQ & FinWin
|
nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Dec 3, 2004 10:23 AM
Msg. 3 of 3
I agree. I was just following the sample code in the WatchList app provided.
I got it working by inserting some Sleep(200) between the Sends. I guess the connection manager needs a bit of time to process one request before I send another one.
|