Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: IdNNTP OnWork doesn't Fire

www.cryer.info
Managed Newsgroup Archive

Re: IdNNTP OnWork doesn't Fire

Subject:Re: IdNNTP OnWork doesn't Fire
Posted by:"Jack MacRank" (ja..@macrank.com)
Date:Fri, 23 Jun 2006 23:01:41

Remy, you must have a very large cranium to hold that brilliant brain of
yours.

"Remy Lebeau (TeamB)" wrote
> Is there any particular reason why you are not using TIdMessage in the
> first
> place? Why format the message data manually?

I saw the same code done in another project and I thought it was a practical
way of doing what I wanted.

> 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.

It's a yEncoded .exe file so yes, it's binary.

>>     (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.

And here was my problem.  The error only occured when the IdNNTP component
was NOT throttled which meant there was no delay from OnWorkBegin to OnWork.
Thus, GetTickDiff would of returned 0 and I guess it blew everything up
without any kind of error message.  Very silly mistake by me.

Thank you very much for your time and help Remy!

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive