协议术语:消息与数据包 [英] Protocol Terminology: Message versus Packet
问题描述
实际上,对于以较高级别协议(例如,高于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.
推荐答案
这些绝对是消息. 数据包"是第3层(使用ISO术语)协议单元,例如IP数据包; 数据报"是第1层或第2层单元,例如可能构成IP数据包片段的几个以太网数据报.
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.
因此,一条消息可能会拆分为多个数据包,尤其是在使用诸如TCP之类的流协议的情况下,而报文可能会拆分为多个数据报.
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.
这篇关于协议术语:消息与数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!