Skip to content

How to use nng with libev or libevent? #1833

Answered by gdamore
mydream59 asked this question in Q&A
Discussion options

You must be logged in to vote

NNG specifically has support for this.

See the NNG_OPT_SENDFD, and NNG_OPT_RECVFD options that you can use with a socket.

These will poll ready (poll for read) when the socket can either send or receive. Note that these file descriptors are only for signaling and should not be accessed directly except for epoll() or poll() or select() signaling.

See https://nng.nanomsg.org/man/v1.2.2/nng_options.5.html#NNG_OPT_SENDFD and https://nng.nanomsg.org/man/v1.2.2/nng_options.5.html#NNG_OPT_RECVFD

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gdamore
Comment options

Answer selected by gdamore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants