Click here to Skip to main content

ATL / WTL / STL

 
QuestionWhile launching a winapp as ole server some time OnFIleNew() failed Pinmembervermaashish_mca31-Dec-12 1:27 
QuestionTCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberbkelly1321-Dec-12 7:09 
AnswerRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti22-Dec-12 10:51 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberbkelly1327-Dec-12 7:16 
Wow, what an incredible reply.  
I don't understand everything you wrote, but a question or two will help.
 
This is a telemetry application.   It receives data from the hardware as a series of identified parameters.   It extracts messsages from within the list of parameters and sends the data to the display device. It outputs data via TCP/IP to the display device, but does not input anything via TCP/IP.
 
When I switched to asynchronous TCP/IP I discovered about WOULDBLOCK and created an array that buffers data until OnSend is called.   That worked OK at relatively slow packet rates, two per milliseconds.  
 
Upon adding in another set of payload packets (there are several types of payload packets that can be inhibited or enabled at run time) the payload packet rate jumped up to five to fifteen or so payload packets per millisecond.   They are generally smaller packets, but the order is indeterminate so it is very intensive to combine payload packets to reduce the overall payload packet rate.
 
When that happened, the app ran out of buffer space and started loosing payload packets.   I bumped up the buffer size from 16, to 32, to 64, then jumped to 240.   It still overflowed.
 
My interpertation is that CAsyncSocket cannot keep up with this packet rate.   When I use blocking TCP/IP calls it works okay.   I can even run four simultaneous copies with no trouble.
 
As I understand your post, I am thinking that this probably cannot be accomplished with CAsyncSocket.  
 
If that a true or false statement?  
 
Don't write too much, I will certainly need to think a while, and re-read your post depending on how you answer this question.
 
Thanks for your time
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti27-Dec-12 14:47 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API [modified] Pinmemberbkelly1328-Dec-12 4:08 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti28-Dec-12 4:37 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberbkelly1327-Dec-12 9:22 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API Pinmemberpasztorpisti27-Dec-12 15:02 
GeneralRe: TCP blocking -vs- CAsyncSocket -vs- Win32 API PinmemberSoMad27-Dec-12 15:51 

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
Web03 | 2.8.150327.1 | Last Updated 25 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid