954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Multiple http requests.

I am not showing all the code it is not necassary.

TheInternets : TWebBrowser;

I wrote a program to navigate to a server that my friend has up. Then it should get a result and display it. This takes about a second to execute which is really bad for my program. Specially considering that if 9 of us run it on different computers they all run at the same speed? I would just like to know if it is possible to send out more Http requests from the same program at once? Cuz I know if I launch my program more than once it still continues at the same speed even though more of them are running.

This the only necessary code for this question, I think.

I heard something about the word "asynchronous" dont know what it means.

procedure TfrmHack.btnShow(Sender: TObject); // ... = a string.
begin
 TheInternets.Navigate(...);
end;

procedure TfrmHack.TheInternetsNavigateComplete(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant);
begin
 ShowResult; // dont worry
end;
gravexxx
Newbie Poster
1 post since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

It depends a bit on what you want to do with the results. If you want to show them all, you could use multiple TWebBrowser's and let each one get a page.

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874
 

You better take advantage of the components of Indy (TidHTTP) and use threads TThread.

Wolfgan
Junior Poster
101 posts since Jun 2010
Reputation Points: 34
Solved Threads: 14
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: