Article View: borland.public.cppbuilder.internet.socket
Article #4730Re: TIdHTTP OnWork
From: Ted Tripp
Date: Wed, 22 Dec 2004 05:15
Date: Wed, 22 Dec 2004 05:15
44 lines
2394 bytes
2394 bytes
Correction--RecBuf is set at 65Kb so I would assume this would have nothing
to do with it.
Thanks
"Ted Tripp" <ttripp@rankexec.com> wrote in message
news:41c90294$1@newsgroups.borland.com...
> OK, Makes sense. But I am running into a situation where, when doing a
> Get on a particular page(s), the data comes in chunks. In other words the
> WorkStart event occurs maybe ten times for a single page, thus causing the
> OnWork to occur 10+ times on the same page. What would cause this? Is
> this a result of the RecBuf size I set and if so, how do I get an accurate
> total of data received. I cheated, so far, and am using the length of the
> resulting string, which appears to be roughly accurate.
>
> Thanks
>
> "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
> news:41c8a682$1@newsgroups.borland.com...
>>
>> "Ted Tripp" <ttripp@rankexec.com> wrote in message
>> news:41c89ab7$1@newsgroups.borland.com...
>>
>>> int nTotalBytes = 0;
>>>
>>> OnWork
>>> {
>>> nTotalBytes += AWorkCount;
>>> }
>>
>> AWorkCount is already the total accumlated amount of data that has been
>> transferred since OnWorkBegin. You should be using the '=' operator
>> instead
>> of the '+=' operator. By using '+=', you are incrementing your variable
>> too
>> much.
>>
>>
>> Gambit
>>
>>
>
>
Technical Details
Message-ID:
<41c90308$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41c89ab7$1@newsgroups.borland.com> <41c8a682$1@newsgroups.borland.com> <41c90294$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a208acfa73369e15 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Ted Tripp" <ttripp@rankexec.com> From: "Ted Tripp" <ttripp@rankexec.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41c89ab7$1@newsgroups.borland.com> <41c8a682$1@newsgroups.borland.com> <41c90294$1@newsgroups.borland.com> Subject: Re: TIdHTTP OnWork Date: Tue, 21 Dec 2004 23:15:52 -0600 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 216.160.57.213 Message-ID: <41c90308$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103692552 216.160.57.213 (21 Dec 2004 21:15:52 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail