Alright, so I have a ROUTER <-> ROUTER setup working by having each ROUTER
socket set its identity to its own external IP address/port combination
(e.g. "tcp://1.2.34.56:7890").  This allows each ROUTER to predict the
identity of each other ROUTER, (otherwise I would never be able to send
messages reliably!) however, it does bring up the problem of needing to find
the external IP address of each node.

The easiest way I can think of to do this, is to write a bare-bones zmq
device to run on a publicly-facing server with an open REP socket, that
replies to any host that connects to it with their IP address..... however,
is it possible to get IP addresses of peers using zmq?  I know ROUTERs
automatically generate an identity for incoming unnamed sockets, but is it
possible to invert that back to an IP address?

If not, is there a more "zmq-like" method of doing what I'm trying to do?

Thanks,
-E

On Thu, Sep 29, 2011 at 6:35 AM, Pieter Hintjens <p...@imatix.com> wrote:

> On Wed, Sep 28, 2011 at 6:32 PM, MinRK <benjami...@gmail.com> wrote:
>
> > In 3.0 ROUTER/DEALER == 2.1-ROUTER/DEALER, but XREP/XREQ != ROUTER/DEALER
> > These 2.1 sockets continue to exist in 3.0 as ROUTER/DEALER, and behave
> in
> > the same way - if you had a ROUTER/DEALER or XREP/XREQ app in 2.1, it
> should
> > work just fine under the ROUTER/DEALER name in 3.0 with no changes (this
> has
> > proven true for IPython), so ROUTER/DEALER are safe transitional socket
> > types, but XREQ/XREP are not.
> > XREQ/XREP have been changed in 3.0 to use the new LABEL prefix stuff, so
> you
> > have to make changes in order to support it.
>
> So the XREP/XEQ explanation from the libzmq zmq_socket doc is accurate
> for 3.0? I'll backport that text, then.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to