[zeromq-dev] blocking send when no peer

Justin Karneges justin at affinix.com
Tue Jan 31 23:42:48 CET 2012


Hi,

As I understand it, calls to zmq_send are supposed to be non-blocking.  The 
data to send is queued in the background, and zmq takes care of sending the 
data when it can.  Thus zmq_send should return immediately (unless the 
internal queue is full, I'd imagine?).

However, does this rule hold true when the underlying transport, for example 
TCP, is not yet connected?  I'm observing the behavior that when I send to a 
PUSH socket I've set to bind (as opposed to connect), without any peer 
existing yet, that the send call blocks instead of backgrounding.

I'm using the python bindings if it makes any difference.

Justin



More information about the zeromq-dev mailing list