[zeromq-dev] Raw protocol spec for REQ/REP socket?

Pieter Hintjens pieterh at gmail.com
Mon Apr 25 14:39:26 CEST 2011


Martin,

It would be really useful to get these fragmented docs into a single page
for TCP interoperability. I'm happy to help edit that if you collect the
pieces.

-Pieter
On 25 Apr 2011 12:59, "Martin Sustrik" <sustrik at 250bpm.com> wrote:
> Hi Gary,
>
>> I want to implement part of the ZeroMQ protocol so I can write
>> programs interact with it,
>> on platforms where ZeroMQ is not available. And I found REQ/REP
>> packets different with
>> 2/SPB: both side make a first connection, sending 1 packet of
>> \x01\x00; close it then send
>> REQ/REP messages, but all messages are prefixed by \x01\x01. What's
>> the use of them?
>> I also checked PUB messages, they're not prefixed. Is it safe to just
>> append \x01\x01 in
>> front of the SPB messages to talk to a ZeroMQ REP server?
>
> The basic framing for TCP is described in zmq_tcp(7), the basic framing
> for PGM is described in zmq_pgm(7).
>
> The first message sent by each TCP peer is its identity. If there's no
> identity set, the message is empty (\x01\x00).
>
> For REQ/REP there's an envelope (ie. backtrace stack) in each message.
> For description, look here:
>
> http://www.zeromq.org/tutorials:xreq-and-xrep
>
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110425/4494bf67/attachment.htm>


More information about the zeromq-dev mailing list