[zeromq-dev] xreq sockets

Martin Sustrik sustrik at 250bpm.com
Mon May 24 08:17:26 CEST 2010

Hi Serge,

> Are there any examples or documentation of XREQ and XREP sockets?

Sorry, it's not documented yet. XREQ/XREP are meant for asynchronous 
request/reply, i.e. one where you can send meany requests without 
waiting for reply after each of them.

> I 
> tried switching from REQ to XREQ and see that it affects a change in 
> payload:
> Message: "this is a test"
> When using REQ sockets, on the REP side I get the following bytes:
> 116,104,105,115,32,105,115,32,97,32,116,101,115,116
> which is expected.  However with XREQ sockets I get 18 extra bytes:
> 17,0,244,78,69,38,83,62,73,47,147,218,207,209,36,199,233,150,
> 116,104,105,115,32,105,115,32,97,32,116,101,115,116
> I suppose 17 indicates the size, but what is the rest that precedes the 
> expected message?

It's routing info. It indicates who to send the reply to.


More information about the zeromq-dev mailing list