-
Notifications
You must be signed in to change notification settings - Fork 30
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
Trying to set ZMQ_CONFLATE within rzmq #56
Comments
Can you push your branch, and drop a link to it here? Alternatively if you make a PR w/ your changes, we can test. |
Thanks for the quick response - here's the PR: #57 Let me know if you need anything else! |
Your PR seems correct. I think the issue you are seeing w/ 'Invalid argument' is related to your sock object being invalid. Please check that before calling set.conflate. Additionally, you can add a simple check after the setsocketopt call to see if your cmd was successful. something along these lines (untested): // add after the call to setsocketopt I don't have time to test locally at this moment, but I can try later this weekend. |
Thanks, will check it out and follow up |
I'm trying to set option
ZMQ_CONFLATE
to 1 (http://api.zeromq.org/master:zmq-setsockopt) for aZMQ_SUB
socket.I didn't see a built-in function to do that, so I tried to add my own. Here's what I did:
R/zmq.R
, following pattern ofset.affinity
:Added
set.conflate
to export list inNAMESPACE
file.Added
set_conflate
function insrc/interface.cpp
, following same pattern asset_affinity
:src/interface.h
in theextern "C"
block:SEXP set_conflate(SEXP socket_, SEXP option_value_);
Deleted
src/rzmq.so
from my prior installation.Re-installed package from source, verified
src/rzmq.so
was re-built.When I tried to use it, it definitely finds the function and tries, but it says the argument is invalid:
Two questions:
1L
is an invalid argument? The docs say it's expecting an integer.ZMQ_CONFLATE
to 1?The text was updated successfully, but these errors were encountered: