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.
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.