Delphi 中 FTP 的 WinInet 包装器
请给点建议吧我想在 WinInet 上用 Delphi 开发 FTP / SFTP / FTPS 客户端下载管理器。做什么更好(Indy、ISC Components、WinInet ...)?可能已经有了解决方案?
Give advice, please. I want to develop FTP / SFTP / FTPS client download manager in Delphi on WinInet. On what better to do (Indy, ISC Components, WinInet ...)? May already have solutions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我有一个轮流执行外部应用程序,本例中的应用程序是 WinSCP。如果有必要我可以插入示例。
I have a rotine execute an external application, this case the application is WinSCP. If there is necessecity I can insert the example.
您没有指定您的 Delphi 版本和目标平台(最新版本的 Delphi 中提供 x64 和 MacOSX),因此这里有一些通用建议:
WinInet: 根本不支持 FTPS ,所以这为您排除了这种情况。
Indy: 使用 Delphi 打包(免费), Delphi最新版本完全支持,成熟,应用广泛,采用同步模型(需要使用线程,这样网络访问不会锁定GUI)。
ICS 组件 :免费、成熟,显然目前还没有 Delphi XE2 支持,因此没有明确的 x64 支持。广泛使用。使用异步模型(不需要线程,在 GUI 线程上使用回调)。
Synapse:鲜为人知的库(免费),更紧凑而且比上面两个更容易理解。还有 FTPS 支持,最近没有更新,但可以与 Delphi 2007-2009 一起使用。同步模型。
我曾与上述四位人士合作过,很难推荐其中一位。它们都可以完成您所需要的功能(WinInet 除外),这只是取决于您对哪种模型(同步/异步)感到更满意或已经在您的应用程序中使用,以及您需要什么级别的平台/编译器支持。如果您看不出有任何理由选择 #3 或 #4,我会说选择 Indy,因为它与 Delphi 捆绑在一起,具有 x64/MacOSX 支持,并且可能会在下一个中工作Delphi 版本也是如此。
You didn't specify your version of Delphi and target platform (x64 and MacOSX is available in the latest version of Delphi), so here is some generic advice:
WinInet: No FTPS Support at all, so this rules this out for you.
Indy: Packaged with Delphi (free), fully supported in the latest version of Delphi, mature, widely used, uses synchronous model (you need to use threads so network access does not lock the GUI).
ICS Components: Free, mature, apparently no Delphi XE2 support as of now, so no explicit x64 support. Widely used. Uses asynchronious model (no need for threads, uses callbacks on the GUI thread).
Synapse: Lesser known library (free), more compact and easy to understand than the above two. Also has FTPS support, not updated recently but works ok with Delphi 2007-2009. Synchronous model.
I worked with all four above, and it is hard to recommend one over another. All of them can accomplish what you need (except WinInet), it just comes down to what model (synchronous/asynchronous) you feel more comfortable with or already use in your application, and what level of platform/compiler support you require. If you don't see any reason to choose #3 or #4, I'd say go with Indy since it is bundled with Delphi, has x64/MacOSX support, and will probably work in the next version of Delphi too.
我不记得具体原因了,但是当我们需要实现 sFTP 和 FTP 时,我们选择了 ipWorks (http://www.nsoftware.com/ipworks) 和 ipWorks SSL/SSH。不过,我不是付钱的人,所以我并不担心费用。
这可能只是因为我们已经在 FTP 部分使用 ipWorks。
I can't remember the exact reasons, but when we needed to implement sFTP and FTPs, we chose to go with ipWorks (http://www.nsoftware.com/ipworks) and ipWorks SSL/SSH. Although, I wasn't the one paying for it, so I wasn't concerned out the cost.
It may have been just because we were already using ipWorks for the FTP part.