[zeromq-dev] empty packet if REQ
ilejncs at narod.ru
Fri Aug 13 13:12:35 CEST 2010
thank you for shedding some light on this.
Without it examples one can see e.g. in your "A multithreaded server in 10 mins"
are slightly mysterious.
To be honest I haven't get why XREQ don't put null packet though.
13.08.10, 14:54, "Martin Sustrik" <sustrik at 250bpm.com>:
> > Could you please describe in more detailed way in which cases these extra identities are appended.
> > (1) (2) (3)
> > REQ-send XREP-recv
> > ID1 ID2
> > null ID1
> > payload null
> > payload
> Actually, the identity as added by XREP socket so it looks like this:
> payload ---> (REQ) --- null|payload --> (XREP) --- id1|null|payload
> ---> (XREQ) --- id1|null|payload ---> (REP) ---> payload
> payload ---> (REP) --- id1|null|payload ---> (XREQ) --- id1|null|payload
> ---> (XREP) ---> null|payload ---> (REQ) ---> payload
> > The question is what should be done at (2) in 0mq API terms to have extra identity added.
> As already said XREP is the socket resposible for adding removing
> identities. So it adds identity of the peer to the request and sends it
> When it gets the reply. It chops one identity from the backtrace stack
> and uses it to route the reply to the right peer.
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
More information about the zeromq-dev