Patrick Wong wrote:
> Thank you for your response.
>> Or use the messageLoop of TWSocket if you dont need to receive custom
>> messages. Set Multithreaded to true.
> But may I know how? I am not quite familiar with Delphi.
Writing/using message loops is not specific to Delphi but to Windows
Wilfried ment that you may use method Pop3Cli.CtrlSocket.Messageloop instead of
writing your own message pump.
> From the
> Pop3prot.hpp MultiThreaded is a protected bool of TSyncPop3Cli
> is inherited from TPop3Cli. Should I use TSyncPop3Cli instead?
No, better run async even in a worker thread.
>> From Arno's previous message,
>> 1 - Create the Pop3Cli instance in Execute
>> 2 - Assign properties and events
>> 3 - Connect
>> 4 - Start your MessageLoop
> It would be great if a sample code excerpt that you can kindly show
> me. Should the worker thread call connect once, and other functions
> in every mail retrieval cycle? My thought was to connect -> get
> mails -> delete mails ->quit in every cycle.
There's no difference between running the component in main thread
or in a worker thread given you process messages by some kind of
Delphi's class TThread does not implement such a message loop by
Think asynchrone, call Connect and the take any further action in the
various event handlers.
Arno Garrels [TeamICS]
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be