Paer Toernell
asked on
Multi thread get TIdHTTP?
Im using Indy and delphi 2007, and trying to multithread the get funkton for TIdHTTP. I want to get 5 pages at the same time, but i get soome kind of socketerror when i use more than one thread. Am i on the wrong track or is it not possible to call 5 TIdHTTP at the same time?
It's possible, show your code
I have a demo which does exactly this. You can take a look at it, and disect it for your own purposes
http://sourceforge.net/projects/internetdemos
"HTTP Multi File Downloader"
http://sourceforge.net/projects/internetdemos
"HTTP Multi File Downloader"
ASKER
Looks nice, but it wont compile:
[DCC Error] MultiFileDownloaderMain.pa s(348): E2009 Incompatible types: 'Parameter lists differ'
[DCC Error] MultiFileDownloaderMain.pa s(349): E2009 Incompatible types: 'Parameter lists differ'
[DCC Error] MultiFileDownloader.dpr(5) : F2063 Could not compile used unit 'MultiFileDownloaderMain.p as'
line:
HTTPClientInsideAThread.On WorkBegin := HTTPClientInsideThreadWork Begin;
[DCC Error] MultiFileDownloaderMain.pa
[DCC Error] MultiFileDownloaderMain.pa
[DCC Error] MultiFileDownloader.dpr(5)
line:
HTTPClientInsideAThread.On
Different component versions?
I take it then, that you are using Indy 10
I'll see if I have time to can recompile it with Indy 10 and I'll post the code here
or you can do it yourself
basically, throw a TidHTTP on a blank form, double click on the OnWorkBegin, OnWork and OnWorkEnd events
copy the parameters in the event headers
(AProcess, ... etc)
and replace the ones in my unit with those
or just give me a day and I'll try to find time to do a Delphi 10 demo :-)
I'll see if I have time to can recompile it with Indy 10 and I'll post the code here
or you can do it yourself
basically, throw a TidHTTP on a blank form, double click on the OnWorkBegin, OnWork and OnWorkEnd events
copy the parameters in the event headers
(AProcess, ... etc)
and replace the ones in my unit with those
or just give me a day and I'll try to find time to do a Delphi 10 demo :-)
ASKER
I gladly give u a day! Thanx!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thnx!
> are you inviting ?
my golf skills are only slighlty better than my spelling :-(
my golf skills are only slighlty better than my spelling :-(