Networking Reference
In-Depth Information
Properties of TCP
Some of the properties of TCP that make it popular among the users are as follows:
Reliability : This is the most important characteristic of TCP. As we have
said earlier, TCP guarantees unduplicated transmission and data delivery.
Full-duplex : TCP allows full-duplex operations, hence two nodes can send
messages to each other simultaneously.
Flow control : TCP uses the sliding-window technique to implement low
control. Sequence numbers attached to the transmission travels with the
ACK (0x10) lag set. This indicates the number of bytes they can receive
without resulting in a buffer overflow.
Multiplexing : This feature allows a single node to handle multiple
processes simultaneously.
ZeroMQ sockets
ZeroMQ sockets have four different methods, just like normal sockets, as we have
said at the beginning of this chapter. It should be noted that ZeroMQ sockets are
always void pointers and are asynchronous.
Differences between TCP sockets and
ZeroMQ sockets
The following is the difference between TCP sockets and ZeroMQ sockets:
• ZeroMQ sockets are asynchronous.
• 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.
• ZeroMQ sockets transmit messages whereas TCP transmit bytes. As we said
in Chapter 1 , Getting Started , a message is a fixed-length binary object.
• 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.
 
Search MirCeyron ::




Custom Search