Max Terentiev wrote:
Use TSslSmtpCli and call the async methods. Your threads must
also implement a message pump or simply call the ICS, built-in,
message pump instead (TSslSmtpCli.CtrlSocket.MessageLoop).
But how to implement message pump if I create many TSmtpCli
inside TThread ?
Unlike
Arno Garrels wrote:
**ALWAYS** create and destroy them in Execute method
That is not always necessary, however ensures that they are
always created in the context of the thread. Note that ICS
event handlers are by default called in the context of the
thread the object was created in.
--
Max Terentiev wrote:
Hi,
Hi,
It's possible to use multiple TSmtpCli inside single TThread ?
Yes.
For example, I want to handle 100 connections using 5 TThreads.
Each TThread should contain 20 TStmpCli's.
Is it's possible ?
No problem, however you should consider to use just as many
Use TSslSmtpCli and call the async methods. Your threads must
also implement a message pump or simply call the ICS, built-in,
message pump instead (TSslSmtpCli.CtrlSocket.MessageLoop).
But how to implement message pump if I create many TSmtpCli
inside TThread ?
I must implement loop like