[zeromq-dev] Odd behavior on "send" depending on whether it's on Mac OS X or Linux

Dmitry Nikiforov dniq at dniq-online.com
Tue Mar 13 19:45:15 CET 2012


I'm using the Perl ZeroMQ bindings in my scripts, and stumbled upon an odd behavior.

On Mac OS X, if I try to connect to a server that does not yet exist, the "send" method blocks until the server is up, and then sends the message. On Linux it doesn't block and just goes right through. In both cases I've installed libzmq the same way - "./configure --prefix=/usr/local && make && sudo make install". Same for ZeroMQ binding for Perl.

Can anybody help me understand why this is happening and how to make it behave consistently? It looks like Perl binding has no error handling routines (even ZeroMQ::Raw is missing zmq_err), so if the "send" always blocks until the server is up - it'd be very helpful.

Alternatively, if someone can provide useful tips on how to detect that connection was not established (the server is not running) - that'd be very much appreciated!


Regards - Dmitry

More information about the zeromq-dev mailing list