On Aug 17, 2006, at 03:29, Arno Garrels wrote:
> There's no difference between running the component in main thread
> or in a worker thread given you process messages by some kind of
> message loop.
>
> Delphi's class TThread does not implement such a message loop by
> default .
>
> Think asynchrone, call Connect and the take any further action in the
> various event handlers.
And to answer your second question: you should call connect, then
retrieve mail and quit, on every cycle. There is no need to leave the
connection open indefinitely, and in fact the server may just close it
after a time out period. Doing this asynchroneously means using a
state-machine, and OnRequestDone() event to trigger the next method in
your chain. In your case, each cycle you will need to do:
- Connect
- USER/PASS (to log in)
- UIDL (to get message list)
- RETR/DELE (for each message, to retrieve and delete it)
- QUIT
dZ.
--
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