Click here to Skip to main content
15,883,835 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: sqlconfigdatasource fails on 64 bit from 64 application Pin
Richard MacCutchan10-Jan-13 23:10
mveRichard MacCutchan10-Jan-13 23:10 
GeneralRe: sqlconfigdatasource fails on 64 bit from 64 application Pin
MrKBA10-Jan-13 23:14
MrKBA10-Jan-13 23:14 
GeneralRe: sqlconfigdatasource fails on 64 bit from 64 application Pin
Richard MacCutchan10-Jan-13 23:32
mveRichard MacCutchan10-Jan-13 23:32 
QuestionProblem with embedded ATL component Pin
HungryCPPDev7-Jan-13 1:08
HungryCPPDev7-Jan-13 1:08 
Questionbooks: activeX and com, Pin
bkelly131-Jan-13 9:58
bkelly131-Jan-13 9:58 
AnswerRe: books: activeX and com, Pin
Jonathan Davies10-Jan-13 1:56
Jonathan Davies10-Jan-13 1:56 
QuestionWhile launching a winapp as ole server some time OnFIleNew() failed Pin
vermaashish_mca31-Dec-12 0:27
vermaashish_mca31-Dec-12 0:27 
QuestionTCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1321-Dec-12 6:09
bkelly1321-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 Pin
pasztorpisti22-Dec-12 9:51
pasztorpisti22-Dec-12 9:51 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1327-Dec-12 6:16
bkelly1327-Dec-12 6:16 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti27-Dec-12 13:47
pasztorpisti27-Dec-12 13:47 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1328-Dec-12 3:08
bkelly1328-Dec-12 3:08 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti28-Dec-12 3:37
pasztorpisti28-Dec-12 3:37 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1327-Dec-12 8:22
bkelly1327-Dec-12 8:22 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti27-Dec-12 14:02
pasztorpisti27-Dec-12 14:02 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
SoMad27-Dec-12 14:51
professionalSoMad27-Dec-12 14:51 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1328-Dec-12 3:13
bkelly1328-Dec-12 3:13 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti28-Dec-12 5:06
pasztorpisti28-Dec-12 5:06 
Questioncalling virtual base class Pin
bkelly1314-Dec-12 7:36
bkelly1314-Dec-12 7:36 
AnswerRe: calling virtual base class Pin
pasztorpisti18-Dec-12 22:39
pasztorpisti18-Dec-12 22:39 
AnswerRe: calling virtual base class Pin
Albert Holguin19-Dec-12 7:22
professionalAlbert Holguin19-Dec-12 7:22 
GeneralThe reason for the question Pin
bkelly1319-Dec-12 15:51
bkelly1319-Dec-12 15:51 
GeneralRe: The reason for the question Pin
Richard MacCutchan19-Dec-12 23:06
mveRichard MacCutchan19-Dec-12 23:06 
GeneralRe: The reason for the question Pin
bkelly1321-Dec-12 6:11
bkelly1321-Dec-12 6:11 
Questioncannot add control variable to checkbox Pin
bkelly1314-Dec-12 3:07
bkelly1314-Dec-12 3:07 

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

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