Created
May 21, 2012 10:01
-
-
Save lipp/2761607 to your computer and use it in GitHub Desktop.
reading ZMQ_FD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zmq.hpp> | |
#include <assert.h> | |
int main(int argc, char* argv[]) | |
{ | |
zmq::context_t context(1); | |
// setup xreq and get fd | |
zmq::socket_t xreq(context, ZMQ_XREQ); | |
xreq.bind("tcp://127.0.0.1:13333"); | |
size_t opt_size; | |
int xreq_fd = -1; | |
xreq.getsockopt(ZMQ_FD, &xreq_fd, &opt_size); | |
assert(xreq_fd > 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment