TCP Socket和ZeroMQ socket的区别

• ZeroMQ sockets are asynchronous.

zmq套接字是异步的


• They may implement particular patterns.

可以实现特定模式


• TCP sockets are one-to-one whereas ZeroMQ sockets are many-to-many.
However, you could implement one-to-many, one-to-one, many-to-one, or

many-to-many with ZeroMQ, depending on your needs and socket type.

TCP是一对一,ZeroMQ是多对多的,可以根据套接字类型实现一对多,一对一,多对一,或多对多


• ZeroMQ sockets transmit messages whereas TCP transmit bytes. As we said

in Chapter 1, Getting Started, a message is a fixed-length binary object.

ZeroMQ传输消息,TCP传输字节


• I/O is done in the background in ZeroMQ sockets. Even if your application

is too busy to handle messages, they are put in queues.

ZeroMQ 隐藏IO细节


• Unlike TCP, ZeroMQ sockets do not care whether the destination exists
or not.

ZeroMQ不在乎目的是否存在


• ZeroMQ sockets may transmit data to multiple nodes and receive data from
multiple nodes.

ZeroMQ可以往多个节点发送数据,可以从多个节点接收数据

你可能感兴趣的:(ZMQ)