Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft constants are missing: ZMQ_RECONNECT_STOP_* #1789

Closed
yurivict opened this issue Sep 29, 2022 · 3 comments · Fixed by #1795
Closed

Draft constants are missing: ZMQ_RECONNECT_STOP_* #1789

yurivict opened this issue Sep 29, 2022 · 3 comments · Fixed by #1795

Comments

@yurivict
Copy link

I wanted to try and see if they would solve the lack of error messages from ZMQ for TCP peers that can't be connected to but these constants are missing.

@minrk minrk changed the title Recently added constants aren't supported: ZMQ_RECONNECT_STOP_CONN_REFUSED ZMQ_RECONNECT_STOP_HANDSHAKE_FAILED ZMQ_RECONNECT_STOP_AFTER_DISCONNECT Draft constants are missing: ZMQ_RECONNECT_STOP_CONN_REFUSED ZMQ_RECONNECT_STOP_HANDSHAKE_FAILED ZMQ_RECONNECT_STOP_AFTER_DISCONNECT Sep 29, 2022
@minrk
Copy link
Member

minrk commented Sep 29, 2022

You're right, these draft constants are not yet exported. draft support in pyzmq is often incomplete.

In the meantime, you can use their actual values (1, 2, 3). pyzmq doesn't need to be aware of most libzmq constants for them to be used.

@yurivict
Copy link
Author

I tried to use them like this: socket.setsockopt(2, 1), but it throws an exception Invalid argument.

@minrk
Copy link
Member

minrk commented Sep 30, 2022

I've never used these options, but I believe those are values for the ZMQ_RECONNECT_STOP option:

socket.setsockopt(zmq.RECONNECT_STOP, 1) # or 2 or 3

@minrk minrk changed the title Draft constants are missing: ZMQ_RECONNECT_STOP_CONN_REFUSED ZMQ_RECONNECT_STOP_HANDSHAKE_FAILED ZMQ_RECONNECT_STOP_AFTER_DISCONNECT Draft constants are missing: ZMQ_RECONNECT_STOP_* Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants