libcurl 和 chilkat 之间哪个库更好?

发布于 2024-11-09 07:03:44 字数 249 浏览 0 评论 0原文

我是 Cocoa 中 FTP 连接编程的新手。我找到了 2 个可以选择用于制作我的应用程序的库,但我不知道这些库之间最好的是什么。这些库是 libcurlchilkat 。问题是每个库有什么好处?有人比较过吗?或者也许有人可以告诉我你的经历吗?谢谢

i'm newbie in FTP connection programming in Cocoa. I found 2 library that i can choose for make my app, but i dont know what's the best between these libraries. The libraries are libcurl and chilkat . The problem is what benefit of each library? Did somebody compare it? or maybe can anyone tell me about your experience? Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

那伤。 2024-11-16 07:03:44

我对 chilkat 没有任何经验,但我可以告诉你,libcurl 在很多编程语言中都有使用,并且可以在很多系统上使用。例如,在 PHP 或 Mac 上,curl 是一个很好用的工具。

因此,如果 libcurl 在您的平台上可用,我会建议您使用它。您可能会找到有关curl的更多信息,并且它已经在许多其他平台上证明了自己。

如果您想使用curl,那么curlhandle也很有趣。它是curl 库的可可包装。对于你的情况可能非常方便,但我没有这方面的经验。

I don't have any experience with chilkat, but I can tell yout that libcurl is used in a lot of programming languages and is available on a lot of systems. In for example PHP or on a Mac curl is a great tool to use.

So I would advice libcurl if it's available on your platform. You will probably find more information about curl and it has proven itself on many other platforms.

Also interesting if you want to go with curl is curlhandle. It's a cocoa wrapper around the curl library. Probably very handy in your case, but I've no experience with it.

花伊自在美 2024-11-16 07:03:44

我可以告诉你,libcurl 和 chilkat 之间的区别是这样的:(尽管你现在可能已经知道了)

Chilkat 就像你在商店购买的国际象棋游戏,而 libcurl 就像你购买的液体形式的塑料,你可以制作任何棋子与.

Libcurl 是一个稍微抽象的套接字连接器,Chilkat 可以处理您使用该连接所做的一切(最多一定数量)。你要么盯着一些碎片,要么盯着一些“把这些碎片变成了电子邮件”的东西。我即将购买 Chilkat 的一些库,我喜欢这些功能,但同时我希望我有时间阅读 RFC 并使用 libcurl 玩其他东西。无论如何,希望这个答案对某人有价值。

I can tell you that the difference between libcurl and chilkat is like this: (though you probably know by now)

Chilkat is like the chess game you buy at the store and libcurl is like the plastic in liquid form you buy that you can make any chess piece with.

Libcurl is a slightly abstracted sockets-connector and Chilkat handles everything you'd do, up to a certain amount, with that connection. You're either staring at bits or something "made those bits into an email". I'm about to buy Chilkat for some of the libs, I like the features, but at the same time I wish I had time to read the RFC's and play with the other stuff using libcurl. Anywho, hope that answer is worth something to someone.

若无相欠,怎会相见 2024-11-16 07:03:44

因为这个问题在谷歌上仍然排名很高,所以我给你我的经验。
我在 2015 年购买了 chilkat,后来转向 libcurl,我自己的实现也更晚了。两者都远非完美。 libcurl 只是显示了它的年龄和一些薄弱的设计。

libCurl 是一个尝试实现所有 URL 协议的库,即使它们被设计为像 FTP 这样的流协议。帮自己一个忙,仅将其与 HTTP/HTTPS 一起使用。它只是完成传输部分。这不足以处理。您至少希望看到 mime 和字符集例程来使用下载的文件。

Chilkat 是一个顶级库,试图为您提供尽可能多的高级访问权限。它在不易于使用的脚本语言中使用后台线程。问题是,当你想编写高质量的程序时,API 很糟糕,文档很少,而且完全失败。例如,它以字符串形式返回请求。没有办法进行流处理。现在想象一下你下载了一个大GB的iso文件,你不会高兴的。它可以作为文件返回,但是当您不知道下载大小时,您必须在请求开始时指定它。

此外,除非另有证明,否则代码质量很差。你可以通过谷歌找到一些乱七八糟的 chilkat 源代码片段,它们纯粹是疯狂的。好吧,我们不知道现在这个旧代码是如何重构的。但它留下了不好的味道,记住这是闭源的,并且没有提及任何关于极端情况、实现了哪个协议、实现了协议的哪些功能等等。你正在使用一个完全黑匣子。

而且它不允许高性能和高价值的代码。我用它写了一个网络爬虫,它比 libcurl 慢得多。

后来我使用 HTTP 和 SSH 组件来自动化一些服务器/客户端管理脚本,它就在那里发挥了作用。你了解双方,可以测试他们是否可以一起工作,并且不会得到任何惊喜。那么它确实比使用损坏的 python 或 ruby​​ SSH 更容易、更好。

但如果您曾经接触过另一个未知的服务器,Chilkat 就不是您的图书馆。

Because this question is still ranking high on google i give you my experience.
I bought chilkat in 2015 and moved to libcurl later and my own implementation much later. Both are far from perfect. libcurl just shows it's age and some weak designs.

libCurl is an library that tries to implement all URL able protocols even if they are designed as stream protocol like FTP. Do yourself a favour and only use it with HTTP/HTTPS. It just does the transfer part. Which is not enough for handling. You would love to see at least mime and charset routines to use the downloaded files.

Chilkat is a toplevel library that tries to give you as much highlevel access as possible. It uses background threads in script languages where it is not easy to use. The problem is that the API is terrible, very little documented and total failure when you want to write a quality program. For example it returns requests as a string. There is no way for stream processing. Now imagine you download a large GB iso file, you wont be happy. It can return as a file but then you have to specify this at the begin of a request when you don't knwo the download size.

Also the code quality until proven otherwise is bad. There are a few chilkat source code snippets in the wild which you can find via google and they are pure madness. Ok we don't know how this old code has been refactored now. But it leaves a bad taste, remember this is closed source and there is not a single mention about corner cases, which protocol is implemented, which feature of protocols are implemented and so on. You are using a total black box.

Also it does not allow high performance and high value code. I used it to write a web crawler and it was much much slower then libcurl.

I later used the HTTP and SSH compoenents to automate some server/client management scripts and there it shines. You know both sides and can just test if they work together and don't get any surprises. Then it is indeed easy and better then using the broken python or ruby SSH.

But if you ever contact with another unknown server, Chilkat is not your library.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文