[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 06:04:29 CET 2022


This isn't good.

This means that anybody who would use ZMQ to handle TCP connections 
wouldn't be able to properly handle basic TCP error conditions because 
they don't fit into ZMQ's paradigm.

Good architecture should handle things easily and with elegance. It 
shouldn't be so abstract that it would ignore important life situations.


Cheers,
Yuri




On 9/27/22 22:25, Jim Melton wrote:
> They aren’t reported because they aren’t “errors” in ZMQ. Because the 
> connection can happen independently (asynchronously) from the call to 
> to connect, and because a socket may be connected to a variety of 
> endpoints, the TCP conditions you are concerned about are not exposed 
> to you.
>
> You are asking about detecting a condition that does not exist in the 
> ZMQ architecture.
>
> Now, depending on the type of socket and the options set, there might 
> be an error in trying to *send* to a socket when the other end isn’t 
> present. Or it might not. PUB sockets, for example, need never have a 
> client connected to allow sends to succeed.
> --
> Jim Melton

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20220927/79991ef7/attachment.htm>


More information about the zeromq-dev mailing list