I'd recommend reading about the Harmony pattern in the Guide. Router-to-router topologies tend to be nasty. I don't use them, and don't recommend them.
On Sun, Jan 18, 2015 at 5:57 PM, André Caron <[email protected]> wrote: > Hi all, > > I've been building an example of a router-router setup in which all nodes > dynamically discover each other. This currently works like a charm. Now, > I'm trying to add curve support for this application, which is proving a bit > confusing despite the API's apparent simplicity. > > Basically, all my nodes have a single router socket which is used both to > connect to other peers and to receive connections. However, I can't seem to > do this when each peer has their own curve keypair. > > I have two problems: > - the same socket can not be a curve server and client at the same time (so > I need at least both two sockets, one to connect and one to receive > connections); and > - a curve client can only set one server key so I cannot connect to multiple > peers using a single router socket. > > The first problem I can live with -- have 2 sockets instead of 1 is not a > major issue. However, the 2nd problem is really annoying. Creating a new > socket for each logical outbound connection smes to me like an anti-pattern > in ZeroMQ. > > So I'm wondering how I should handle this. > > I found this on the zmq_curve(7) man page: > >> A socket can change roles at any point by setting new options. The role >> affects all zmq_connect and zmq_bind calls that follow it. > > Is it safe to assume that I can simply set a new server key before each > zmq_connect()? > > Thanks, > > André > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
