There's another advantage to doing one socket per address---it makes it easy to pick and choose which interfaces you really want to listen/beacon on. On a phone, for instance, it might make a lot of sense to beacon on wlan0 (wifi) and bnep0 (bluetooth), but less sense to beacon on rmnet0 (4G). Alternatively, if you are using a network simulator like CORE or EMANE, you might need to make sure you *only* beacon over a particular interface.
How these interfaces are specified is, of course, a difficult problem to get right. Nonetheless, the ability to be selective is useful. On Thu, Jan 2, 2014 at 8:51 AM, Pieter Hintjens <[email protected]> wrote: > On Thu, Jan 2, 2014 at 1:06 PM, Arnaud Loonstra <[email protected]> > wrote: > > > IMHO the easiest way to solve this is to get the ipaddress through the > > 0mq socket. Pieter you said this was available in 0mq4+. Are there any > > examples or docs? > > It's not yet available at the libzmq API, only internally. I'm not > happy making the ZRE protocol depend on a specific version of ZeroMQ > either. > > The beacon isn't a problem afaics: it is trivial to get the sender > address for a beacon and we already do that. I don't see there's any > requirement for endpoints except tcp:// at the moment. So a beacon > with port number is fine. > > I think we can get the socket interface address for each received > beacon, and deliver that as a 3rd frame. > > -Pieter > _______________________________________________ > 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
