I have sniffed some of the traffic using the examples in the guide using ngrep. The captured traffic are commented along with the bytes captured by ngrep. Here are the captured files: 1. PROTOCOL-REQREP This capture explain the REQ-REP dialog between hwclient and hwserver 2. PROTOCOL-REQREP-IDENTITY This capture explain the REQ-REP dialog between hwclient and hwserver, the hwclient socket has been configured to use ZMQ_IDENTITY using zmq_setsockopt 3. PROTOCOL-EXREQREP This capture explain the dialog between rrbroker, rrclient, and rrworker. rrbroker uses DEALER socket to talk to rrworker (REP) and rrbroker uses ROUTER socket to talk to rrclient (REQ).
I'm not too sure about the correctness of the comments in the capture files, but as far that I can do, I used formal grammar as specified in RFC15. Any correction will be very appreciated. Regards, Herry Sitepu On Fri, Apr 12, 2013 at 4:15 PM, Pieter Hintjens <[email protected]> wrote: > On Fri, Apr 12, 2013 at 6:21 AM, asif saeed <[email protected]> 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 > > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
PROTOCOL-EXTREQREP
Description: Binary data
PROTOCOL-REQREP
Description: Binary data
PROTOCOL-REQREP-IDENTITY
Description: Binary data
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
