Delphi:TIdHTTP与TNetHTTPClient [英] Delphi: TIdHTTP vs TNetHTTPClient

查看:220
本文介绍了Delphi:TIdHTTP与TNetHTTPClient的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Delphi编写一个下载管理器,它具有一些自定义功能,例如断点续传下载和通过代理下载.

I'm writing a download manager in Delphi with some custom features like resumable downloads and downloading through proxies.

我正在研究不同的组件解决方案:Indy和NetHTTP,两者看起来都非常接近.

I'm studing different component solutions: Indy and NetHTTP, both seem very close.

  • TNetHTTPClient似乎是winhttp.dll的接口.

TIdHTTP似乎是wininet.dll的接口(但我不确定).

TIdHTTP seem to be an interface of wininet.dll (but i'm not sure).

TIdHTTP似乎是一个非常古老的组件(可能非常稳定/经过测试),并且在线提供大量文档.

TIdHTTP seems like a very old component (maybe very stable/tested) and has tons of documentation online.

TNetHTTPClient似乎是一个很新的组件,并且没有联机的良好文档.

TNetHTTPClient seems to be a very recent component, and doesn't have good documentation online.

我还不确定...选择哪个?

I'm a bit undecided... which one to choose?

要点是:这两个组件之间的主要区别是什么?

我的问题有点争议(主要是基于意见),但是我没有发现这两个组件之间有任何实际的比较.

My question is a bit disputable (primarily opinion-based), but I haven't found any practical comparison between these two components.

推荐答案

Indy根本不使用WinInet/WinHTTP.它直接使用基于跨平台BSD/POSIX的套接字API(例如Windows上的WinSock),完全从头开始实现Internet协议(例如HTTP).

Indy DOES NOT use WinInet/WinHTTP at all. It uses cross-platform BSD/POSIX based socket APIs directly (like WinSock on Windows), implementing Internet protocols (like HTTP) completely from scratch.

TIdHTTP是手动HTTP实现.

TIdHTTP is a manual HTTP implementation.

TNetHTTPClient则包装系统提供的HTTP API(例如Windows上的WinInet/WinHTTP).

TNetHTTPClient, on the other hand, wraps system-provided HTTP APIs instead (like WinInet/WinHTTP on Windows).

这篇关于Delphi:TIdHTTP与TNetHTTPClient的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆