[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] ZMQ REQ / REP naming Swap?
From: |
Michael Dickens |
Subject: |
Re: [Discuss-gnuradio] ZMQ REQ / REP naming Swap? |
Date: |
Thu, 28 Jul 2016 15:20:17 -0400 |
On Thu, Jul 28, 2016, at 03:11 PM, Sylvain Munaut wrote:
> > But this model doesn't work for the REP / REQ in Figure 2
> > "Request-Reply". I would expect the ZMQ REQ to be a GR sink but instead
> > if is a source; likewise, I'd expect the ZMQ REP to be a GR source & it
> > is instead a sink.
> >
> > The internal coding is consistent with the external naming; I just
> > question whether the naming was swapped. Am I missing something? - MLD
>
> Basically it's coded so that you REQuest some samples from a server.
>
> So the REQ is the source (it sends a request for data and gets back
> some samples that are fed to GR).
> And REP obviously then has to be a sink since it waits for a REQuest
> and when it gets one, sends some data out of GR in the REPlies.
OK. I think the issue is that's not how ZMQ is designed to work with
respect to REQ/REP. I think it's designed to do "sink -> REQ -> ZMQ ->
REP -> source", so that the REQ is a sink & REP is a source. In a quick
internet search, this model is what I turn up. GR's model is the name
swap of this model; it would work internally to GR, but I won't be able
to connect GR to the outside world (or, at least my application) because
of this swapping.
I'll write my own OOT that does ZMQ REP/REQ the way I need.
Thanks! - MLD