[zeromq-dev] Question regarding handshake(?) message

Thijs Terlouw thijsterlouw at gmail.com
Fri Mar 19 13:50:27 CET 2010


Hello,

I am currently learning about ZeroMQ and reading the online docs and
mailing list has been helpful so far.

My usage: a server (written in Erlang) listens to a certain IP:Port
and workers (written in C++, using the ZeroMQ library ZMQ_REP type)
connecting to the server. The server sends tasks to the workers and
one of the workers handles the task. Since there is no Erlang client,
I wrote my own very simple partial implementation, more or less just
based on TCP sockets + round-robin routing. I considered making an
Erlang driver, but the design ended up being quite complex.

Two questions:

1. When the workers connect to the Erlang server, they seem to send a
packet <<1,0>> (first byte value 1 (length) and then \0 byte). Where
can I find the meaning of this handshake? Is it in fact a handshake or
does such a concept even exist in ZeroMQ? I didnt see it mentioned
anywhere.

2. The packet format of the messages seems to be <<Length:8, 0:8,
Data/binary>> (for small messages, I'm aware of the alternative for
large messages). I'm not sure where this second byte comes from? I
didnt expect it based on this description of the wire format :
http://www.zeromq.org/whitepapers:design-v01 Perhaps this whitepaper
is not up-to-date anymore, if so: I want to suggest to add a notice on
the top of each whitepaper that it refers to an older version.

Besides that, thanks for all the work you do for ZeroMQ. It's a very
interesting MQ-approach and I intend to study it much more.

--
Thijs Terlouw,
Shenzhen, China
http://www.startinchina.com



More information about the zeromq-dev mailing list