[zeromq-dev] error in the guide?
Martin Sustrik
sustrik at 250bpm.com
Tue Jan 24 02:01:03 CET 2012
On 24/01/12 01:22, Chuck Remes wrote:
> A DEALER socket is a synonym for XREQ and a ROUTER socket is a
> synonym for XREP. The REQ& REP sockets are built on top of those
> other types. When sending data from a REQ to a ROUTER socket, for
> example, you will see that the ROUTER socket receives the message as
> IDENTITY + NUL part + payload. The NUL part is a requirement for
> routing via intermediate devices. Eliminating that NUL part may work
> for directly connected sockets, but the routing will very likely
> break if there are any intermediate sockets (like a QUEUE device). If
> it works without the NUL part, then it's probably just luck and we
> shouldn't count on it working in the future.
The best way to think about it, I think, is that XREP and XREQ handle
the addresses in the initial message parts. They know nothing about the
empty frame.
REQ and REP are just thin end-to-end wrappers on top of XREQ and XREP.
The only thing they know about is the empty frame. REQ socket adds an
empty frame to the messages, REP socket blindly copies all message parts
up to the empty frame from the request to the reply etc.
Thus, if the example in the quide doesn't use REQ and/or REP it doesn't
have to care about empty frames.
Martin
More information about the zeromq-dev
mailing list