walrus
walrus

Reputation: 171

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.

Upvotes: 4

Views: 2330

Answers (1)

user3666197
user3666197

Reputation: 1

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__ )
...

Upvotes: 2

Related Questions