Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1867924
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:37:21+00:00 2026-05-17T06:37:21+00:00

I have an application that queries a web service by a date range. The

  • 0

I have an application that queries a web service by a date range. The web service returns a list of GUID’s. I then take each GUID and download a WAV file that it corresponds too. Right now I do it one by one and works fine. What I would like to do is download up to N number of WAV files simultaneously. For some reason I just can not grasp a good way to accomplish this.

I use IP*Works (n/Software) TipwHTTP(async) component.

Anyone have any suggestions to push me in the right direction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:37:21+00:00Added an answer on May 17, 2026 at 6:37 am

    Put each download in a separate thread and manage that list of downloads. You can use OmniThreadLibrary for instance to ease the thread programming. You can also look at my threading unit at Cromis which is a lot simpler but it may be enough for your case. It is very easy to use.

    If you dislike threads you can also make an exe that takes input params when started and downloads the content to a specified location.

    Just note that downloading many files simultaniously will only probably help if you download from different sources, if not you will still be limited by the bandwith of your only source and also have a threading overhead on you.

    Here is a code with my threading unit and Indy for HTTP, just for example because it is easy to understand:

    procedure TfMain.FormCreate(Sender: TObject);
    var
      Task: ITask;
    begin
      FTaskPool.DynamicSize := cbDynamicPoolSize.Checked;
      FTaskPool.MinPoolSize := StrToInt(ePoolSize.Text);
      FTaskPool.OnTaskMessage := OnTaskMessage;
      FTaskPool.Initialize;
    
      for I := 1 to NumberOfDownloads do
      begin
        Task := FTaskPool.AcquireTask(OnTaskExecute, 'HTTPDownload');
        Task.Values.Ensure('TargeFile').AsString := aFileName;
        Task.Values.Ensure('URL').AsString := aDownloadURL;
        Task.Run;
      end;
    end;
    
    procedure TfMain.OnTaskExecute(const Task: ITask);
    var
      HTTPClient: TIdHTTP;
      FileStream: TFileStream;
    begin
      HTTPClient := TIdHTTP.Create(nil);
      try
        FileStream := TFileStream.Create(Task.Values.Get('TargeFile').AsString, fmCreate);
        try
          HTTPClient.Get(Task.Values.Get('URL').AsInteger, FileStream);
          Task.Message.Ensure('Result').AsString := 'Success';
          Task.SendMessageAsync;
        finally
          FileStream.Free;
        end;   
      finally
        HTTPClient.Free;
      end;
    end;
    
    procedure TfMain.OnTaskMessage(const Msg: ITaskValues);
    begin
      // do something when a single download has finished
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written an application that queries a web service I wrote (which returns
I have a Rails application that queries a 3rd party web service. I am
I have a web application that was build in c# and uses queries in
In my MVC3 application, I have a queries class specific to each controller that
I have an ASP .NET Web Application that queries and shows data from a
I have a web-service application that exposes lot of web-methods ( internally calling internal
I have a web service which queries the cloud for some data and then
I have an ASP web application that executes MDX queries using SSAS. I have
I have a prototype application (RESTful web service database front-end) that is written using
I have application that makes different queries with different results so the caching in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.