I had connected zeromq, the “msg_in” already queued. If there is no new message in the period of time the queue come on the set for timeout. how to set the timeout. The following is the core code
requestDict = {"id":111, "name":"test"}
zmqConn.mSocket.send(json.dumps(requestDict), flags=zmq.NOBLOCK)
msg_in = zmqConn.mSocket.recv()
You should use Poller for timeouts: