[zeromq-dev] Router-Dealer Example not working in C on 4.0.4 ZMQ release

Badhrinath Manoharan badhrim at gmail.com
Fri Jul 25 23:59:37 CEST 2014


Charles,

Thanks a lot for the reference page. That was very helpful.

Badhri


On Fri, Jul 25, 2014 at 1:51 PM, Charles Remes <lists at chuckremes.com> wrote:

> This tutorial that focuses on dealer and router sockets might also help
> explain things a bit more too. When in doubt, the zguide text takes
> precedence but this tutorial should still be correct.
>
> http://zeromq.org/tutorials:dealer-and-router
>
> cr
>
> On Jul 25, 2014, at 3:17 PM, Badhrinath Manoharan <badhrim at gmail.com>
> wrote:
>
> > Hi Peter,
> >
> > No issues at all. I totally get your thoughts here. Thanks a lot again
> for the detailed response.
> >
> > I just got misled that we could use Router - Dealer as similar to Rep -
> Req socket. Moreover I had one client and one server so thought it might
> work.
> >
> > Anyways thanks a lot for correcting my understanding. Will surely give
> it a try and update the thread.
> >
> > Thanks again
> > Badhri
> >
> > Sent from my iPhone
> >
> > On Jul 25, 2014, at 1:33 AM, Pieter Hintjens <ph at imatix.com> wrote:
> >
> >> Sorry if that email seemed unpolite; it was late and I'd been driving
> >> for 10 hours with three small kids who refused to sleep.
> >>
> >> So, ROUTER sockets always prefix the incoming message with an extra
> >> frame that holds a routing id (aka "identity"), that identifies which
> >> pipe the message came in from. You stick that same frame back before
> >> outgoing replies, and the ROUTER socket then knows which pipe to send
> >> it to.
> >>
> >> These IDs start with a binary zero. If you try to printf them, the
> >> result is an empty string. In my example code, if you tried it, the
> >> print shows this ID frame quite clearly.
> >>
> >> This is explained in detail in Chapter 3 of the Guide, and briefly in
> >> the zmq_socket man page for ZMQ_ROUTER.
> >>
> >> It is not trivial, and you should really read the Guide and work
> >> through the examples before trying to use ROUTER.
> >>
> >> -Pieter
> >>
> >> On Fri, Jul 25, 2014 at 12:53 AM, Pieter Hintjens <ph at imatix.com>
> wrote:
> >>> You're not reading the man pages, nor documentation, nor example
> >>> output properly.
> >> _______________________________________________
> >> zeromq-dev mailing list
> >> zeromq-dev at lists.zeromq.org
> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> 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/20140725/a6fb4cc2/attachment.htm>


More information about the zeromq-dev mailing list