-
Notifications
You must be signed in to change notification settings - Fork 523
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
zmsg_recv_nowait #65
Comments
Your issue is because you want You can call This is the source code from zmsg_t *
zmsg_recv (void *socket)
{
assert (socket);
zmsg_t *self = zmsg_new ();
if (!self)
return NULL;
while (1) {
zframe_t *frame = zframe_recv (socket);
if (!frame) {
zmsg_destroy (&self);
break; // Interrupted or terminated
}
if (zmsg_add (self, frame)) {
zmsg_destroy (&self);
break;
}
if (!zframe_more (frame))
break; // Last message frame
}
return self;
} It help? :) |
Yea, I know its that easy. :P I just dont feel like pulling for such a popular repository. If you think it is usefull to others, you can make the change, otherwise close this issue. |
If you want, you can send a PR and I'll review it :) |
I am trying to create a priority queue that receives all messages from the zmq queue.
In that case, having a zloop informs you if there is a message or not, not the queue size. With a zmsg_recv_nowait , you can get all remaining messages, do some work and then return to the zloop.
I am new to this, so tell me if there is a better way of doing this.
The text was updated successfully, but these errors were encountered: