[zeromq-dev] Unreasonable behavior of a socket when connection can't be established. How to enable the blocking mode on a socket?

Yuri yuri at rawbw.com
Wed Sep 28 04:52:22 CET 2022


Different philosophy is fine.

But why doesn't ZMQ report connection errors?
When 'Connection refused' (ECONNREFUSED),  'Operation timed out' 
(ETIMEDOUT) or several other relevant error conditions arise they should 
be reported to the user. Why aren't they reported?


Yuri





On 9/27/22 21:37, Jim Melton wrote:
> That’s not a bug; it’s a feature. From 
> http://api.zeromq.org/2-1%3azmq-connect 
> <http://api.zeromq.org/2-1:zmq-connect>,
>
> The connection will not be performed immediately but as needed by ØMQ. 
> Thus a successful invocation of /zmq_connect()/ does not indicate that 
> a physical connection was or can actually be established.
>
>
> ZMQ sockets are not TCP sockets. There is an unfortunate overloading 
> of terms, and what you think you know may not apply to ZMQ. Go back 
> and read https://zguide.zeromq.org/docs/chapter2/#The-Socket-API where 
> this is described in some detail.
> --
> Jim Melton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20220927/355beecf/attachment.htm>


More information about the zeromq-dev mailing list