Good free FTP Client Library (for Windows C++ comm

2020-02-09 11:57发布

问题:


Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 6 years ago.

I'm looking for a good open source Windows FTP client library with a public domain or BSD-type license. Something that I have access to the source code and I can use it from C++ for Windows applications in a commercial app.

We have used Wininet for years and it's buggy and horrible. The last straw is the IE8 beta 2 contains a new bug in InternetGetLastResponseInfo(). I can no longer justify using Wininet when our users can install the latest version of IE and break our app.

I have looked at libcurl but it is way too heavy for our needs. The only thing I need is FTP support. I could spend a day stripping out all the code in libcurl I don't need, but I'd rather just start with a nice simple FTP client library, if possible.

I looked at ftplib (http://nbpfaus.net/~pfau/ftplib/) but it's GPL and I need this for a closed-source commercial app.

I've written FTP client code before, it's not that hard (unfortunately it was 15 years ago and I don't have the source code anymore). There must be a nice simple free client library that does nothing but FTP and has a license that can be used in closed-source commercial apps.

(If you are curious, the bug is that if you attempt to FtpFindFirstFile() with an FTP site where you can't make a passive-mode connection, InternetGetLastResponseInfo() doesn't return the full response. This is just one of many bugs I've found over the years. Another is that Wininet's FTP support ignores all timeout values. That particular bug has existed for years.)

回答1:

You need Ultimate TCP/IP which is now free!

http://www.codeproject.com/KB/MFC/UltimateTCPIP.aspx

You get FTP. HTTP, SMTP, POP and more.

You won't regret it.



回答2:

I have used libCurl to very good effect. The only disadvantage is that, to my knowledge, there is no support for parsing directory information that comes back from FTP servers (apparently, there is no standard directory format).



回答3:

Checkout filezilla server for windows.



回答4:

Are you looking for a command-line interface or an API? You may be able to adapt the feature-rich wget to your needs. Otherwise, take a look at http://www.sourceforge.net for lots of options.



回答5:

This is the best FTP library I know: Kira's FTP Library, you can download it at: http://kirarelease.altervista.org/Home/index.html

Pass with the mouse above the box, you will understand why I like it so much: The code is the simplest I've found til now :)