Click here to Skip to main content
       

ATL / WTL / STL

 
AnswerRe: sqlconfigdatasource fails on 64 bit from 64 application PinmvpRichard MacCutchan10-Jan-13 23:10 
GeneralRe: sqlconfigdatasource fails on 64 bit from 64 application Pinmemberkhaliloenit10-Jan-13 23:14 
GeneralRe: sqlconfigdatasource fails on 64 bit from 64 application PinmvpRichard MacCutchan10-Jan-13 23:32 
QuestionProblem with embedded ATL component PinmemberHungryCPPDev7-Jan-13 1:08 
Questionbooks: activeX and com, [modified] Pinmemberbkelly131-Jan-13 9:58 
AnswerRe: books: activeX and com, PinmemberJonathan Davies10-Jan-13 1:56 
QuestionWhile launching a winapp as ole server some time OnFIleNew() failed Pinmembervermaashish_mca31-Dec-12 0:27 
QuestionTCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberbkelly1321-Dec-12 6:09 
Environment Windows XP Pro, Visual Studio 2008, MFC, C++
 
This application processes real time telemetry data.   The first incarnation uses blocking TCP calls and works fine.   It is just difficult to deal with due to the blocking calls.
 
The second implementation uses CAsyncSocket.   After much work I discovered that it can keep up when about 1/3 of the data is processed.   It cannot keep up with all the data.
 
I say that with some level of confidence because the code monitors the depth of the buffering queue.   Since the telemetry data never stops, at the TCP/IP level, when it receives the WSAEWOULDBLOCK error, it buffers payload packets until it get the OnSend.   At the one third data rate the max buffer fill level is 91 payload packets.   At the full rate the buffer, currently 240 deep) overflows, frequently.
My next step might be to go to the Win32 API level.
 
I started with MFC because the vendor whose software feeds me the data provided an MFC template that showed how to get data from their application.   It was written in Visual Studio 2008 MFC.   During real time operations it does no user interactions and no GUI updates.
 
Or, I maybe I should just abandon the asynchronous effort due to a combination of too much effort, too litle return, and maybe even not possible.
 
Drawing on the reader's experience, and on Richard MacCutchan's response in my previous thread, and with a packet rate well in excess of 10 per millisecond:
 
What is the probability of success if I switch over to the Win32 API programming. Switch to a console application?   Is the asynchronous code inherently less efficient, or is this more likely a problem using the CAsynchSocket class. (I presume it looses efficiency in the tradeoff for ease of use.) Or maybe an MFC problem, or combination thereof.
 
Right now I am leaning towards abandoning the asynchronous effort and just use the blocking code that works well. I would like to hear your thoughts.
 
Thanks for your time
AnswerRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti22-Dec-12 9:51 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberbkelly1327-Dec-12 6:16 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti27-Dec-12 13:47 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API [modified] Pinmemberbkelly1328-Dec-12 3:08 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti28-Dec-12 3:37 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberbkelly1327-Dec-12 8:22 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti27-Dec-12 14:02 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API PinmemberSoMad27-Dec-12 14:51 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberbkelly1328-Dec-12 3:13 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti28-Dec-12 5:06 
Questioncalling virtual base class Pinmemberbkelly1314-Dec-12 7:36 
AnswerRe: calling virtual base class Pinmemberpasztorpisti18-Dec-12 22:39 
AnswerRe: calling virtual base class PinmemberAlbert Holguin19-Dec-12 7:22 
GeneralThe reason for the question Pinmemberbkelly1319-Dec-12 15:51 
GeneralRe: The reason for the question PinmvpRichard MacCutchan19-Dec-12 23:06 
GeneralRe: The reason for the question Pinmemberbkelly1321-Dec-12 6:11 
Questioncannot add control variable to checkbox Pinmemberbkelly1314-Dec-12 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140921.1 | Last Updated 12 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid