Closed stuaxo closed 8 years ago
I don't have much experience in using this library but making non-blocking BUS was not a problem! I think that in PAIR it would be the same:
data = your_socket.recv(flags=nanomsg.DONTWAIT)
The only problem is that it raises exception instead of return None - so my code looks like this:
try:
data = your_socket.recv(flags=nanomsg.DONTWAIT)
except nanomsg.NanoMsgAPIError:
data=None
If you want to detect proper exceptions that you have to check error codes (errno) of exception.
Cheers :)
Hi, Does this support nonblocking mode ? I'm thinking of using PAIR with it ..
S