You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I basically want to plug zeromq into another event loop, so that the I/O watcher of that event loop can handle readable file descriptors.
I'm actually doing this for the perl binding. The end effect I want is something like:
my $w;
$w = AnyEvent->io( fh => $socket->fd, poll => "r", callback => sub {
my $msg = $socket->recv( ZMQ_NOBLOCK );
if ($msg) {
undef $w;
process_message( $msg );
}
} );
which would be doable if the socket constructs has some sort of accessor to the underlying file descriptor. (And since I'm using the C wrapper, an equivalent C function to go along with it)
Would something like this be feasible in the next coming version?
The text was updated successfully, but these errors were encountered:
The functionality is already merged in the trunk (to be released as 0MQ/2.1). Use ZMQ_FD socket option to get the file descriptor. Note that it signaling POLLIN means just "something happened with the socket". You still have to check another socket option (ZMQ_EVENTS) to find out whether the socket became readble/writable.
csrl
pushed a commit
to exosite-archive/zeromq2
that referenced
this issue
Dec 22, 2012
I basically want to plug zeromq into another event loop, so that the I/O watcher of that event loop can handle readable file descriptors.
I'm actually doing this for the perl binding. The end effect I want is something like:
which would be doable if the socket constructs has some sort of accessor to the underlying file descriptor. (And since I'm using the C wrapper, an equivalent C function to go along with it)
Would something like this be feasible in the next coming version?
The text was updated successfully, but these errors were encountered: