🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4731

Re: TIdHTTP OnWork

#4731
From: Ted Tripp
Date: Wed, 22 Dec 2004 05:13
34 lines
2192 bytes
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: <41c90294$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41c89ab7$1@newsgroups.borland.com> <41c8a682$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>
Subject: Re: TIdHTTP OnWork
Date: Tue, 21 Dec 2004 23:13:55 -0600
Lines: 36
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; Original
NNTP-Posting-Host: 216.160.57.213
Message-ID: <41c90294$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1103692436 216.160.57.213 (21 Dec 2004 21:13:56 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail