-
Notifications
You must be signed in to change notification settings - Fork 193
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
Added devices API #331
base: master
Are you sure you want to change the base?
Added devices API #331
Conversation
any updates on this? would like to see it get merged |
bump on this again, thanks |
@erickt, any update on reviewing/merging this? Thanks |
QUEUE => zmq_sys::ZMQ_QUEUE, | ||
}; | ||
raw as c_int | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this return a result rather than a panic?
Also, could you add a newline before this line?
updated `from_raw` to return a result rather than a panic, and added a new line between `to_raw` and `from_raw`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking through the pyzmq API docs, it looks like the device api was dropped in ZMQ 3.2, and replaced with http://api.zeromq.org/master:zmq-proxy. We do already have support for this in
Line 1138 in eede431
pub fn proxy(frontend: &Socket, backend: &Socket) -> Result<()> { |
I wouldn't consider myself the main maintainer of this library (cc @rotty), but it looks like we're currently depending on zeromq 4.1 and above, so could you switch to proxy
?
Also, do you know if zmq 4.1 and above actually exposes zmq_device
? It might not actually be exposed, which might cause a compilation issue.
Finally, if we do decide to support this device API, can you add some tests for it?
ah ok i didn't see that device was deprecated. ill try switching over to proxy, thanks |
@tdudz no problem! Please let me know if you still need this functionality, and we can try to come up with a way to implement it (since it seems pyzmq somehow does it) |
@erickt i just tested my project using proxy and it seems to work fine. sorry for all the trouble, i should have read the docs a little closer! appreciate the help though and thanks for the great zmq package |
added the devices api to match functionality in pyzmq
I tried to follow the style of the library - please let me know if there are any changes needed before merging