协议术语:消息与数据包

发布于 2024-07-23 10:30:01 字数 131 浏览 3 评论 0原文

在实践中,对于采用更高级别协议(例如 TCP/IP 之上的协议)通过网络传输的通信最合适的术语是什么? 具体来说,我指的是小的二进制数据单元。

我在各种客户端/服务器库中都看到过“消息”和“数据包”,但我对社区的共识感兴趣。

In practice, what is the most appropriate term for the communications transmitted over a network in higher level protocols (those above TCP/IP, for example)? Specifically, I am referring to small, binary units of data.

I have seen both "message" and "packet" referred to in various client/server libraries, but I was interested in the community's consensus.

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

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

发布评论

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

评论(4

尤怨 2024-07-30 10:30:02

这些绝对是消息。 “数据包”是第 3 层(ISO 术语)协议单元,例如 IP 数据包; “数据报”是第 1 层或第 2 层单元,例如可能组成 IP 数据包片段的多个以太网数据报。

因此,一条消息可能会被拆分为多个数据包,特别是当您使用 TCP 等流协议时,并且一个数据包可能会被拆分为多个数据报。

These are definitely messages. A "packet" is a layer-3 (in ISO terminology) protocol unit, such as an IP packet; and a "datagram" is a layer-1 or layer-2 unit, such as the several Ethernet datagrams that might make up the fragments of an IP packet.

So a message might be split across several packets, particularly if you're using a streaming protocol such as TCP, and a packet might be split across several datagrams.

那片花海 2024-07-30 10:30:02

只是我的看法。 这可能取决于您的工作级别。 当我想到整个传输(所有标头、数据等)时,我将其称为消息。 数据包(尤其是 TCP/IP 中的数据包)只是消息的一部分。 多个数据包通过网络推送,构成完整的消息。

Just my take. It probably depends on what level you are working at. When I think of the entire transmission (all headers, data, etc) I would call that a Message. A packet, especially in TCP/IP, is just a part of a message. Multiple packets are pushed across the network comprising an entire message.

羅雙樹 2024-07-30 10:30:02

我认为数据包是指在以太网等较低层上传输的数据块,而消息用于高层信息交换。

在我看来,它们基本上意味着相同...

编辑:

还有另一个称为帧的术语,它在 RFC 1122 中定义为“链路层协议中的传输单元,由链路层标头和后面的数据包组成”。 [维基百科]

I think packet refers to the chunks of data transferred on a lower layer like Ethernet and message is used for higher level information exchange.

imo they basically mean the same...

edit:

There's also another terminology called frame, which is defined in RFC 1122 as "the unit of transmission in a link layer protocol, and consists of a link-layer header followed by a packet." [wikipedia]

请爱~陌生人 2024-07-30 10:30:02

msgs 是网络层中的数据包

它是 TCP 协议(​​传输层)中的分段

它是 HTTP 或 FTP(应用层)中的 msgs

msgs is packet in Network Layer

it is segement in TCP protocol(Transmission Layer)

it is msgs in HTTP or FTP(Application Layer)

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