[zeromq-dev] Can't bind same ZMQ_UP/DOWNSTREAM multiple times.

Pieter Hintjens ph at imatix.com
Tue Aug 17 11:02:52 CEST 2010


On Tue, Aug 17, 2010 at 6:39 AM, Oliver Smith <oliver at kfs.org> wrote:

> But I would have thought that internally if multiple socket_ts tried to
> bind to the same IP socket address ///via the same context/// you would
> have handled that internally the same way that you handle multiple
> connects: thus allowing multiple threads within an application to
> service the same socket.

Well, the question makes more sense now but (excuse my poor tired
brain), there are still aspects escaping me.

Do you want the second thread to take over the socket?  Do you want to
fair-share incoming connections so that one thread gets half of the
connections, and the second thread the other half?  Do you want each
thread to get all the connections but then fair-queue messages between
the two threads?

Seems weird when an endpoint becomes two threads.  Perhaps you're
asking for the ability to pass a socket to a different thread.  Martin
S. is investigating this afair.

And, sorry to be stubbornly stupid, I still don't see why you actually
need to reuse the same address rather than a second one.

Oliver, could you explain what semantics you expect by "multiple
threads servicing the same socket?"

Cheers
-Pieter



More information about the zeromq-dev mailing list