Max Terentiev wrote:
>> Do not reconnect directly from an event handler, but post
>> a custom window message and from the message handler set
>> properties as needed and reconnect.
> 
> But if I understand correctly CloseDelayed already use PostMessage

That's correct.

> and window handler to terminate connection.

The message handler calls method Close which in turn will trigger
various events depending on the current state.

> 
> So, if I will use CloseDelayed I can reconnect from SmtpCli event
> handlers ?

No, that does not change anything. Do not do that, it won't work 
reliable!
You could however start a timer to reconnect in the timer event if
you need a little bit longer delay.
 
This is similar to the rule to never free an instance from one of
its own event handler ;-)  

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to