message-oriented sockets & byte stream-style sockets

来源:互联网 发布:淘宝的账务处理 编辑:程序博客网 时间:2024/05/28 15:07

Message Oriented protocols send data in distinct chunks or groups.
The receiver of data can determine where one message ends and another begins.

Stream protocols send a continuous flow of data.

Here is an example with mobile phones.
Text messages would be a message oriented protocol as each text message is distinct from the other messages.
A phone call is stream oriented as there is a continuous flow of audio throughout the call.

Common protocols used on the internet are UDP (message oriented) and TCP (stream oriented).

0 0
原创粉丝点击