Board index » delphi » HTTPServer and Threads - Basic, probably...
HTTPServer and Threads - Basic, probably...
2004-08-23 07:42:28 PM
I have written an app that works 100% as single thread application.
However, I have now been told that the client may attempt to send a load of
requests at the same time. Up to 10.
So now, I need to make my app multithreaded, and not sure where to go. IU
see there's an AThread : TIdPeerThread parameter on most of the THTTPServer
(Indy) functions. However, I am not sure how to use these as I am new to
I think I need to create a TThread unit, and put all the work I currently
have in my IdHTTPServer1CommandGet function, but am not sure how this is
done, and also, how I pass all the parameters to this new thread function.
Also, I am not sure how the response would be delt with.
AThread: TIdPeerThread; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo:
Those are the parameters with the IdHTTPServer1CommandGet function. Could
anyone help me out?