Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : Re: TIdSMTP raises Thread creation error, help!!!
| Subject: | Re: TIdSMTP raises Thread creation error, help!!! |
| Posted by: | "David" (focus..@yeah.net) |
| Date: | Wed, 31 Jan 2007 18:26:10 |
Sorry, I missed. You mean not use the TIdAntiFreeze, yes, I don't use it in
my program.
I will try to set the ConnectTimeout to 0. Is the ReadTimeout is as same as
ConnectTimeout to cause this issue? If I need to set ReadTimeout to 0 too?
Thanks
"David" <focusme@yeah.net> 写入消息新闻:45c06bf3@newsgroups.borland.com...
> Thanks for your reply, Remy
>
> The TIdSMTP is created in the thread, and after email send completed, the
> TIdSMTP will be freed, and will be created again if a new email will be
> sent. In this case, can I add a TIdAntiFreeze in it? And where do I create
> it? Can I create it in the thread?
>
> Thanks
>
> "Remy Lebeau (TeamB)" <no.spam@no.spam.com> 写入消息新闻:45bdacea$1@newsgroups.borland.com...
>>
>> "David" <focusme@yeah.net> wrote in message
>> news:45bc93ae@newsgroups.borland.com...
>>
>>> the Connect produce will create thread?
>>
>> Yes, it does. That is the only way to implement the ConnectTimeout
>> functionality for a blocking socket. The actual connection is opened
>> in a worker thread, while Connect() keeps track of the elapsed time.
>> If it takes too long, Connect() closes the socket. The thread is then
>> killed regardless of whether the connection succeeded or failed.
>>
>> The only way to bypass the thread is to set ConnectTimeout to 0, and
>> not use a TIdAntiFreeze component. If ConnectTimeout is not 0, or
>> TIdAntiFreeze is used, then the thread is created.
>>
>>
>> Gambit