Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the ZeroMQ valid .recv() flags?

In pyzmq Socket.recv_pyobj, you can supply an optional parameter int flags, which can be 'Any valid .recv() flag'. Unfortunately I can't find any reference as to what these flags actually are.

So, what are the valid .recv() flags in ZeroMQ?

I've tagged this question with both the pyzmq and zeromq tags because I believe the answer may not be specific to pyzmq.

like image 479
walrus Avatar asked Oct 24 '25 15:10

walrus


1 Answers

Since ZeroMQ v.2.x .recv() method supports ZMQ_NOBLOCK flag and ZMQ_RCVMORE flag.

The flags argument, as defined in the API, is a combination of the flags.

Be also informed, that respective third party language bindings / wrappers { may | do } provide their respective own ( typically #define'd constant names ), so the best place to check is the pyzmq source code.

So far a python was equipped with these flag-constants in this manner:

import zmq

print( zmq.__version__ )
2.1.11

print( zmq.NOBLOCK )
1

print( zmq.RCVMORE )
13

print( zmq.Socket.recv.__doc__ )
...
like image 187
user3666197 Avatar answered Oct 27 '25 05:10

user3666197