Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : Re: TIdSMTP raises Thread creation error, help!!!

www.cryer.info
Managed Newsgroup Archive

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:15:06

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

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive