Home » Developing U++ » UppHub » FTP class and reference example for U++
Re: FTP class and reference example for U++ [message #47858 is a reply to message #43130] |
Wed, 12 April 2017 22:34   |
Oblivion
Messages: 1202 Registered: August 2007
|
Senior Contributor |
|
|
Hello guys,
Today marks a new milestone for FTP package. The new version (1.1) of FTP package is finally here.
After several iterations, I believe the package has become stable.
This version brings multithreaded file transfers to the ftp class, via two convenience functions: FtpAsyncGet() and FtpAsyncPut():
int FtpAsyncGet(const String& remote_file, const String& local_file, const String& host, int port = 21, const String& user = Null,
const String& pass = Null, Event<int, int, String, int64, int64> progress = CNULL, bool active = false, bool ssl = false,
bool ascii = false);
int FtpAsyncPut(const String& local_file, const String& remote_file, const String& host, int port = 21, const String& user = Null,
const String& pass = Null, Event<int, int, String, int64, int64> progress = CNULL, bool active = false, bool ssl = false,
bool ascii = false);
As you can see the syntax is very similar to the single-threaded FtpGet() and FtpPut() functions. Except these async functions do concurrent upload/download while retaining the flexibility of the Ftp class.
Moreover, these functions are implemented in a general way that, I believe, they can serve also as a reference implementation. While the Ftp class itself is still single threaded.
Also, in this version, the FEAT command is implemented. It is now possible to query the capabilities of ftp servers easily.
One more addition to the package is a multithreaded simple FTP browser example.
Example browser can use secure connection (FTPS), download, upload, manipulate files, and manipulate directories, show file information etc.
First on my todo list is to implement REST command to allow restart/resume of interrupted transfers.
And Mirek, I know that you are a very busy person, but you'd asked me about the advantages of my ftp implementation over the current one in Core/Ftp.
I now believe FTP package is eligible to Bazaar, considering that it has IPV6, FTPS, multithreading support, better integration with U++ core and UI classes, a clean code-base, active development, is well documented, and easily extendible (using SendCommand() method), and has an example browser built around it. It makes a good alternative. What do you think?
As usual, you can find the development log and updated package in the first post of this topic.
I tested FTP package with several public FTP servers, and private servers I set up.
I can recommend,
ftp.uni-erlangen.de, User: Anonymous, Password: Anonymous.
test.rebex.net, User: demo, Password: password. Allows FTPS
demo.wftpserver.com, User: demo-user, Password: demo-user. Allows FTPS and temporary uploads.
Cheers!
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 12 April 2017 23:00] Report message to a moderator
|
|
|
 |
|
FTP class and reference example for U++
By: Oblivion on Sun, 27 April 2014 18:11
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
By: mirek on Wed, 14 May 2014 09:25
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Wed, 12 April 2017 22:34
|
 |
|
Re: FTP class and reference example for U++
By: Klugier on Wed, 12 April 2017 23:05
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Thu, 13 April 2017 08:17
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Thu, 13 April 2017 13:55
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Fri, 14 April 2017 23:45
|
 |
|
Re: FTP class and reference example for U++
By: Klugier on Sat, 15 April 2017 19:23
|
 |
|
Re: FTP class and reference example for U++
By: Klugier on Sat, 15 April 2017 19:38
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Sun, 16 April 2017 18:28
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Wed, 24 December 2014 12:06
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Thu, 25 December 2014 18:03
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Wed, 07 January 2015 20:52
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Tue, 20 January 2015 01:17
|
 |
|
Re: FTP class and reference example for U++
By: unodgs on Tue, 07 July 2015 19:40
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
By: unodgs on Wed, 08 July 2015 10:20
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Sat, 18 March 2017 23:28
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Sun, 09 April 2017 02:32
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Sun, 23 April 2017 23:41
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Mon, 24 April 2017 19:01
|
 |
|
Re: FTP class and reference example for U++
By: Klugier on Mon, 24 April 2017 22:12
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Tue, 25 April 2017 08:37
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
By: Tom1 on Fri, 16 June 2017 10:23
|
 |
|
Re: FTP class and reference example for U++
|
 |
|
Re: FTP class and reference example for U++
By: Oblivion on Mon, 02 April 2018 00:17
|
Goto Forum:
Current Time: Sat Apr 26 01:17:02 CEST 2025
Total time taken to generate the page: 0.02184 seconds
|