Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: IdNNTP OnWork doesn't Fire
| Subject: | Re: IdNNTP OnWork doesn't Fire |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 23 Jun 2006 18:31:22 |
"Jack MacRank" <jack@macrank.com> wrote in message
news:449c8901@newsgroups.borland.com...
> when researching this with a sniffer I found that only 32KB of
> data was being sent and then abruptly quits resulting in the
> application freezing.
Without seeing the actual sniffer logs, it sounds like maybe you are not
sending the data correctly.
> I read in the Indy10 help that the default send/recv buffer is 32KB
> which might have something to do with the problem.
That has nothing to do with this issue.
> I have events wired to OnWorkBegin, OnWork and OnWorkEnd.
> When the problem occurs only the OnWorkBegin and OnWorkEnd fire.
In order for OnWorkEnd to fire, OnWork had to have fired as well, unless
there was no data to send in the first place, or if an exception occured. If
the sending had frozen, OnWorkEnd would not have fired at all.
> Below is my entire code.
Is there any particular reason why you are not using TIdMessage in the first
place? Why format the message data manually?
What does the contents of "odac7.exe.ntx" actually look like? If it is a
binary file, then you are not setting up the message headers properly for
binary transfers.
> (AWorkCount / (GetTickDiff(startTime, GetTickCount) / 1000)) / 1024
If GetTickCount() returns 0, which is likely during the first few blocks of
data being sent, you are going to have an EDivByZero error occur. Since you
are not catching or preventing that, the exception can terminate the send
prematurely.
Gambit