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 9177269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:17:09+00:00 2026-06-17T17:17:09+00:00

I developped an application that uses indy component to download updates from a remote

  • 0

I developped an application that uses indy component to download updates from a remote server.
The problem is that if the FTP server is down or the IP address is not correct, the idFTP.connect() takes too long to give the result (connection failure).

What is the best way to accelerate the connection answer, or may be checking ip address before connection to idFTP.

Thanks in advance.

  • 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-06-17T17:17:10+00:00Added an answer on June 17, 2026 at 5:17 pm

    Well, native connect() API timeouts are notoriously lengthy by design, (to accommodate high latency links like modems). Artificially shortening the timeout may result in premature failure notification, (though as many developers have never seen a modem, it’s not that much of a problem today:).

    FTP is a reasonably complex transfer requiring two TCP connections and perhaps a DNS lookup – any of these could conceivably generate long connection delays. TidFTP has an inherited ‘ReadTimeout’ property and a connect() overload with a timeout parameter, but I’m not sure how effective they are.

    Historically, I have always timed out such operations myself using a TTimer or similar – if the FTP thread does not respond with a suitable signal, (eg. TThread.Sychronize or user-defined Windows message SendMessage()’d to the GUI), in time, a ‘FTP failed’ actions are taken and a flag is set in the FTP thread that tells it to ignore any replies and self-terminate. Don’t use PostMessage – if you do, there is a small window of time in which a posted response my be queued up while the TTimer is firing – a race.

    Oh – and if you are just plonking a TidFTP onto the form, (or creating one in TForm.FormCreate), and trying to run it from the main GUI thread, (with, or without, TidAntiFreeze), stop doing it and thread off the FTP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a C# 4.0 desktop application that uses a SQL Server Express
I have developed a web application that uses a web server and database hosted
We have developed a .NET web application that uses SQL Server as a backend.
We have developed a medium-sized ASP.NET / SQL Server application that uses resource files
I developed an application that uses internet permissions. If i start the app from
I am updating an application (not developed by me) that uses three20. I was
I have developed an application that reads files from the folder chosen by the
I've developed an application that populates a treeview from hierachical data in a database.
I have developed an application that uses bouncy castle provider for generating keystore. Everything
I've developed a monitoring application that uses Spring-3.0 Hibernate-3.6.5 with SpringHibernateTemplate as DAO. Database

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.