協議術語:消息與數據包 (Protocol Terminology: Message versus Packet)


問題描述

協議術語:消息與數據包 (Protocol Terminology: Message versus Packet)

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.


參考解法

方法 1:

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.

方法 2:

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.

方法 3:

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]

方法 4:

msgs is packet in Network Layer 

it is segement in TCP protocol(Transmission Layer) 

it is msgs in HTTP or FTP(Application Layer)

(by Adam PayntercjsAgileJonFloHong Cheng)

參考文件

  1. Protocol Terminology: Message versus Packet (CC BY-SA 3.0/4.0)

#terminology #packet #networking #protocols #message






相關問題

抽象 ViewModel 在被繼承時是否被視為模型? (Is an abstract ViewModel considered a Model when it is inherited?)

什麼是 Lambda? (What is a Lambda?)

具體確定項目順序的排序的正確術語是什麼? (What is the proper term for an ordering where the order of items is concretely determined?)

在 Ruby 中,“接收者”指的是什麼? (In Ruby what does the "receiver" refer to?)

錯誤跟踪和問題跟踪系統有什麼區別? (What's the difference between a bug tracking and an issue tracking system?)

為什麼術語 API 和 SDK 似乎可以互換使用? (Why do the terms API and an SDK seem to be used interchangeably?)

Java 中的對等類是什麼? (What is a peer class in Java?)

模擬和模擬有什麼區別? (what is the difference between Emulate and Simulate?)

協議術語:消息與數據包 (Protocol Terminology: Message versus Packet)

表示“目錄”或“文件”的詞是什麼? (What is the word that means "directory" or "file"?)

C ++中復合語句和塊之間的區別? (Difference between a compound statement and a block in C++?)

gnu八度中gnu的含義? (Meaning of gnu in gnu octave?)







留言討論