> *Subject:* [twsocket] FTPCli in thread > *From:* Fredrik Bergström <fredrik...@ko2000.nu> > *To:* twsocket@elists.org > *Date:* Mon, 17 Sep 2012 19:41:01 +0200 > > Hi, > > I started writing an message to this list about an timeout-issue we > have been having, but I think it may be better for me to first ask > for some guidance on how to run OverbyteIcsFtpCli properly from a > thread. > I know we should have some kind of message pump running in the > thread, but would it be ok to have something like this?
TMagFtp from: http://www.magsys.co.uk/delphi/magxfer.asp uses FtpCli in a thread, and has a demo program to run 200 FTP sessions simultaneously. But it uses sync methods, since the thread is dedicated to FTP and does not have a form to keep responsive. The most important issue is to create the FTP component in the Execute method of the thread so the message window has the correct context, and set Multithreaded to true so the ICS message pump is used while waiting for sync methods to complete. Nothing more complicated than that. Angus -- 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