[zeromq-dev] Duplicate socket connection problem

Sandeep Joshi sanjos100 at gmail.com
Sat Jun 14 19:51:46 CEST 2014

On Sat, Jun 14, 2014 at 10:28 PM, Brian <brian at openbazaar.org> wrote:

> Can I create multiple socket connections to the same server at the same
> time or will one timeout?

Recently, for error-recovery reasons, I tried having multiple client ROUTER
sockets connecting to one ROUTER socket on the same server and it worked.
   The multiple client sockets have to have different identities.  Either
don't set ZMQ_IDENTITY or ensure its different for each client socket.

Funny thing though is that the connects for all sockets had to be called at
initialization before sending data on any socket.

If I sent data on one ROUTER-ROUTER connection and then called connect() on
the next ROUTER socket, the second one wouldn't send any data.   I checked
the zmq::router_t structure for the second client socket in the debugger
and found that the pipe was not in "outpipes" (router.hpp) list but
remained in "anonymous_pipes".    On the server, both sockets seemed to
have been accepted since there were 2 members in the "outpipes".   Maybe
someone here can shed light on this discrepancy


> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140614/4a2711fa/attachment.htm>

More information about the zeromq-dev mailing list