有人可以解释一下什么是线路级协议吗?

发布于 2024-08-22 12:28:55 字数 111 浏览 8 评论 0原文

我不太清楚线路级协议的想法。我听说 BitTorrent 使用它,并且读到有线级别协议可以被视为 API 的对立面。我读到 RMI 调用可以被视为线级协议,但我仍然有点困惑。有人可以用更好的方式解释这一点吗?

I am not very clear about the idea of wire-level protocols. I heard BitTorrent uses it and read that a wirelevel protocol can be considered an opposite of API. I read RMI calls can be considered wirelevel protocols but am still a little confused. Can someone explain this in a better way?

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

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

发布评论

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

评论(4

菊凝晚露 2024-08-29 12:28:55

我不会说某个东西使用或不使用线路级协议 - 我会谈论它使用的哪种线路级协议。

基本上,如果某个东西正在与远程计算机通信(即使是概念上的),那么就会有一些数据通过网络连接(线路)传输。该数据的描述是“线路级协议”。即使在这种情况下,您也常常无法描述各个网络数据包 - 因此基于 TCP 的协议的有线协议通常是根据打开连接、两台计算机之间的数据流来定义的,以及双方预计何时关闭连接的详细信息。

I wouldn't say that something uses a wire-level protocol or doesn't - I'd talk about which wire-level protocol it uses.

Basically, if something's communicating with a remote machine (even conceptually) then there's some data going across the network connection (the wire). The description of that data is the "wire-level protocol". Even within that, you would often stop short of describing individual network packets - so the wire protocol for a TCP-based protocol would usually be defined in terms of opening a connection, the data streams between the two computers, and probably details of when each side would be expected to close the connection.

洋洋洒洒 2024-08-29 12:28:55

引用此处发布的答案

线路级协议可以被认为是 API 的补充。
您无需定义函数和创建库,而是定义
通过网络传递的对话字节序列
发生。

当协议在线路级别指定并发布时,大多数
技术可以使用它,或者被制造来使用它。将此与 API 进行比较,
其中实际实现特定于平台。

JMS 是一个 API。 HTTP 是一种协议。 AMQP 提供中间件
相当于 HTTP,而由其他人提供
实现。

Quoting the answer posted here

A wire-level protocol can be thought of as the complement of an API.
Instead of defining functions and creating libraries, you define the
conversational byte sequences that pass over a network to make things
happen.

When a protocol is specified at the wire-level and published, most
technologies can use it, or be made to use it. Compare this to an API,
where the actual implementation is specific to the platform.

JMS is an API. HTTP is a protocol. AMQP delivers the middleware
equivalent of HTTP while leaving it up to others to provide
implementations.

我偏爱纯白色 2024-08-29 12:28:55

Google 搜索并发现了以下内容:

示例:

  • HTTP
  • CORBA
  • DCOM
  • SOAP

您自己尝试过吗?如果是这样,你还有什么不明白的?

I googled and found the following:

Examples:

  • HTTP
  • CORBA
  • DCOM
  • SOAP

Did you try this yourself? If so, what don't you understand?

半枫 2024-08-29 12:28:55

引用自维基百科

在计算机网络中,有线协议是指一种从点到点获取数据的方式:如果多个应用程序必须进行互操作,则需要有线协议。与传输级别的传输协议(如 TCP 或 UDP)相比,术语“有线协议”用于描述在应用程序级别表示信息的常见方式。

Quoting from wikipedia:

In computer networking, a wire protocol refers to a way of getting data from point to point: A wire protocol is needed if more than one application has to interoperate. In contrast to transport protocols at the transport level (like TCP or UDP), the term 'wire protocol' is used to describe a common way to represent information at the application level.

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