B4J Question [Closed] When does an FTP connection open?

Brian Dean

Well-Known Member
Licensed User
Longtime User
I have an application that retrieves and saves assets (small files) to a fixed net location, usually individually but sometimes in batches. I would like to open and close the FTP connection before each individal or batch transfer and close it afterwards. Closing the FTP connection is easy - "FTP.Close". When is the connection opened - is it at FTP.Initialise or is it when a job is started?

By the way, I am handing the FTP transfers in a class, and will have multiple instances of the class within the application.

[Edit : I think that I have found the answer by experiment - FTP.Initialise opens the connection.]
 
Last edited:

amykonio

Active Member
Licensed User
Longtime User
[Edit : I think that I have found the answer by experiment - FTP.Initialise opens the connection.]
Hi.

Yes. I think this is the right answer. That's why it's good to put initialize in a try catch block and to check initialized value. Don't forget that a timeout may occur.
 
Upvote 0
Top