[zeromq-dev] Sniffing connections
Pieter Hintjens
ph at imatix.com
Fri Apr 12 11:15:12 CEST 2013
On Fri, Apr 12, 2013 at 6:21 AM, asif saeed <asif.lse2 at gmail.com> wrote:
> I don't understand. TCP is already implemented in 0MQ, why is this
> protocol needed in the first place? Could you please give me a tutorial,
> etc?
>
Good question. I'll add some explanation in the RFC. Here is the story:
TCP carries a stream of bytes with no structure and no meaning. At the
least we need to encode messages, with size and body. This was the original
0MQ TCP protocol: just frames with no other meaning. Then we added a flags
byte so we could do multipart frames. Then we sent the identity as the
first frame. Now we found it was impossible for older versions of the
library to talk to newer ones, so we added a version number. We wanted to
allow peers to check socket types, so we added the socket type to the
greeting. Then we wanted to add security so we added a security handshake...
So it goes. Without a formal protocol, you can certainly send and receive
messages but you cannot promise much more.
-Pieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130412/4a11b1c2/attachment.htm>
More information about the zeromq-dev
mailing list