好的免费 FTP 客户端库(适用于 Windows C++ 商业应用程序)?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/259166/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:33:13  来源:igfitidea点击:

Good free FTP Client Library (for Windows C++ commercial apps)?

c++windowsftp

提问by mhenry1384

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.

我正在寻找具有公共域或 BSD 类型许可证的良好开源 Windows FTP 客户端库。我可以访问源代码的东西,我可以从 C++ 中将它用于商业应用程序中的 Windows 应用程序。

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.

我们已经使用 Wininet 多年了,它有很多问题而且很糟糕。最后一根稻草是 IE8 beta 2 在 InternetGetLastResponseInfo() 中包含一个新错误。当我们的用户可以安装最新版本的 IE 并破坏我们的应用程序时,我无法再证明使用 Wininet 是正确的。

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.

我看过 libcurl,但它对于我们的需求来说太重了。我唯一需要的是 FTP 支持。我可以花一天时间去掉 libcurl 中我不需要的所有代码,但如果可能的话,我宁愿从一个不错的简单 FTP 客户端库开始。

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

我查看了 ftplib ( http://nbpfaus.net/~pfau/ftplib/),但它是 GPL,我需要它作为闭源商业应用程序。

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.

我以前写过 FTP 客户端代码,并不难(遗憾的是 15 年前,我没有源代码了)。必须有一个很好的简单的免费客户端库,它除了 FTP 之外什么都不做,并且有一个可以在闭源商业应用程序中使用的许可证。

(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.)

(如果您很好奇,错误在于如果您尝试在无法建立被动模式连接的 FTP 站点上使用 FtpFindFirstFile(),则 InternetGetLastResponseInfo() 不会返回完整响应。这只是众多响应中的一个多年来我发现的错误。另一个是 Wininet 的 FTP 支持忽略所有超时值。那个特定的错误已经存在多年了。)

采纳答案by Rob

You need Ultimate TCP/IP which is now free!

您需要现在免费的 Ultimate TCP/IP!

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

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

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

你得到了 FTP。HTTP、SMTP、POP 等。

You won't regret it.

你不会后悔的。

回答by Jon Trauntvein

I have used libCurlto 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).

我使用libCurl效果非常好。唯一的缺点是,据我所知,不支持解析从 FTP 服务器返回的目录信息(显然,没有标准的目录格式)。

回答by spireent

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

这是我所知道的最好的 FTP 库:Kira 的 FTP 库,你可以在: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 :)

将鼠标移到盒子上方,您就会明白为什么我如此喜欢它:代码是我目前找到的最简单的代码 :)

回答by Cory House

Checkout filezilla serverfor windows.

签出 Windows 的filezilla 服务器

回答by Adam Liss

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

您在寻找命令行界面还是 API?您可以根据wget自己的需要调整功能丰富的产品。否则,请查看http://www.sourceforge.net以获取大量选项。