[zeromq-dev] XREP/XREQ in 2.0.7

Matt Weinstein matt_weinstein at yahoo.com
Mon Jul 12 16:49:28 CEST 2010


AFAIK

XREQ/XREP are packet concentrators and forwarders, which are used as  
convenient plumbing to e.g. back-to-back two binds().

XREQ/XREP sockets receive additional "header" packets which are used  
to route responses, etc.

These packet include the UUID of the requester (17 bytes?) and a  
trailing null packet to indicate end of header.

Sender sends:
	[ data ] ....

XREP receives:

	[ UUID ] [ Ø ] [ data ] ....

Where UUID is the corresponding "identity" of the requester's pipe.

Take a look at the source code.

BTW, you probably don't need to be interpreting these packets unless  
you are tweaking the protocol...

Corrections welcome!

Best,

Matt

On Jul 12, 2010, at 10:22 AM, hamster wrote:

> Hello!
>
> Would somebody please clarify the status of XREP/XREQ implementation  
> in 2.0.7? I
> started to explore possible ways to implement async client/server  
> exchange and
> got strange outcome. The example given in the blog post "A  
> multithreaded server
> in 10 mins" works just fine, however if I try to run local_lat/ 
> remote_lat
> example from the distr having ZMQ_REQ/ZMQ_REP replaced with ZMQ_XREQ/ 
> ZMQ_XREP
> local_lat fails with "message of incorrect size received" (received  
> size is
> always 17 bytes).
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev




More information about the zeromq-dev mailing list