3

我试图了解 WCF 中标准绑定之间的区别。作为其中的一部分,我正在阅读WCF Bindings in Depth。图 2 显示了传输是 HTTP 的绑定和一些是 TCP 的绑定。我很困惑 b/c 我认为 HTTP 是一个应用程序级协议,而不是一个传输协议——而且 HTTP 运行在 TCP 之上。那么通过称它为 HTTP 绑定,我们是否理解它实际上是在 TCP 之上的 HTTP 上运行的?

4

2 回答 2

3

So by calling it an HTTP binding, are we to understand that it's actually running on HTTP on top of TCP?

Yes, exactly. But that's implicit. Because HTTP runs on top of TCP.

The binary bindings (such as netTcpBinding) run directly on TCP. They do not use HTTP at all.

于 2013-01-26T19:32:50.033 回答
0

tcp/ip 包含 4 层:

application
transport
network
data link

您可以使用任何层,但 wcf 具有使用传输层和应用层的绑定,fenetTcpBindingwsHttpBinding

tpc/ip 与 tcp 层不同

application layer protocols f.e.: HTTP, RTP, FTP, DNS
transport layer protocols f.e.: TCP, UDP, SCTP, DCCP

所以http可以基于UDP协议,wsHttpBinding 或者如果你选择tcp它将是netTcpBinding,这个层在http下面,应用程序是多余的

于 2013-01-26T19:45:18.477 回答