Q : " How can a client detect this failure? "
Fact #0 :
The Connection Management meta-plane used to be since ever, due to architectural & performance reasons, not directly accessible from the application-level code.
Fact #1 :
Users may wish not to have the Fact #0 in place :o)
Solution?
Try the limits of the as-is state of the zmq_socket_monitor()
, still evolving as the whole our Universe is, and try to live with capabilities available for connection-oriented transport-classes via ZMQ_EVENT_HANDSHAKE_FAILED
and possibly others.
Still that's not matching your needs?
Perhaps try to separate the concerns - let AUTH/CRYPT meta-plane part being operated independently ( ssh + port-forwarding, having their resources & methods to setup, manage, detect state-changes ) and let ZeroMQ use that meta-plane infrastructure in a zero-auth/zero-crypt mode, as all that was sufficiently outsourced to the prior meta-plane.
That's cool, isn't it?
Neither did I find any code example that would solve my problem, nor did you provide me with such a code example, nor has the python API a zmq_socket_monitor() function. And I'm pretty much tired from scanning through ZeroMQ test cases in order to figure out how things somehow maybe under certain conditions could possibly work. And that exactly is the reason why I ask: Mentioning that there could be some "meta-plan part independently operated infrastructure" is nice but not really helpful. A recipe that solves my problem would be. So: No, that isn't cool :-) – Regis May 46 mins ago
1)
've you read (not heaps of SLOCs, there was no such advice [was it?] but rather) the published API documentation for zmq_socket_monitor()
?
2)
Have you provided site mandatory MCVE-formulated problem, having a reproducible fashion?
3)
Have you defined a { PASS | FAIL }-clause for reproducible assessment of the said MCVE from 2)?
Neither 1), nor 2), nor 3) - so I did my best in directing you to the pair of directions, that are solving your generic problem. ZeroMQ is cool, using smart tools for outsourcing AUTH/CRYPT parts is cool.
Not a Gimme codez site here :o)