Click here to Skip to main content
12,697,662 members (28,004 online)

ATL / WTL / STL

 
AnswerRe: sqlconfigdatasource fails on 64 bit from 64 application Pin
Richard MacCutchan11-Jan-13 0:10
mvpRichard MacCutchan11-Jan-13 0:10 
GeneralRe: sqlconfigdatasource fails on 64 bit from 64 application Pin
khaliloenit11-Jan-13 0:14
memberkhaliloenit11-Jan-13 0:14 
GeneralRe: sqlconfigdatasource fails on 64 bit from 64 application Pin
Richard MacCutchan11-Jan-13 0:32
mvpRichard MacCutchan11-Jan-13 0:32 
QuestionProblem with embedded ATL component Pin
HungryCPPDev7-Jan-13 2:08
memberHungryCPPDev7-Jan-13 2:08 
Questionbooks: activeX and com, Pin
bkelly131-Jan-13 10:58
memberbkelly131-Jan-13 10:58 
AnswerRe: books: activeX and com, Pin
Jonathan Davies10-Jan-13 2:56
memberJonathan Davies10-Jan-13 2:56 
QuestionWhile launching a winapp as ole server some time OnFIleNew() failed Pin
vermaashish_mca31-Dec-12 1:27
membervermaashish_mca31-Dec-12 1:27 
QuestionTCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1321-Dec-12 7:09
memberbkelly1321-Dec-12 7: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 10:51
memberpasztorpisti22-Dec-12 10:51 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1327-Dec-12 7:16
memberbkelly1327-Dec-12 7:16 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti27-Dec-12 14:47
memberpasztorpisti27-Dec-12 14:47 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1328-Dec-12 4:08
memberbkelly1328-Dec-12 4:08 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti28-Dec-12 4:37
memberpasztorpisti28-Dec-12 4:37 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1327-Dec-12 9:22
memberbkelly1327-Dec-12 9:22 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti27-Dec-12 15:02
memberpasztorpisti27-Dec-12 15:02 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
SoMad27-Dec-12 15:51
memberSoMad27-Dec-12 15:51 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
bkelly1328-Dec-12 4:13
memberbkelly1328-Dec-12 4:13 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pin
pasztorpisti28-Dec-12 6:06
memberpasztorpisti28-Dec-12 6:06 
Questioncalling virtual base class Pin
bkelly1314-Dec-12 8:36
memberbkelly1314-Dec-12 8:36 
AnswerRe: calling virtual base class Pin
pasztorpisti18-Dec-12 23:39
memberpasztorpisti18-Dec-12 23:39 
AnswerRe: calling virtual base class Pin
Albert Holguin19-Dec-12 8:22
memberAlbert Holguin19-Dec-12 8:22 
GeneralThe reason for the question Pin
bkelly1319-Dec-12 16:51
memberbkelly1319-Dec-12 16:51 
GeneralRe: The reason for the question Pin
Richard MacCutchan20-Dec-12 0:06
mvpRichard MacCutchan20-Dec-12 0:06 
GeneralRe: The reason for the question Pin
bkelly1321-Dec-12 7:11
memberbkelly1321-Dec-12 7:11 
Questioncannot add control variable to checkbox Pin
bkelly1314-Dec-12 4:07
memberbkelly1314-Dec-12 4: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.


Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 29 Dec 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid