def _set_timeout(self, short=True, seconds=None):
if seconds is not None:
base = seconds * 1000
else:
base = 5000
if not short:
base *= 2
self._conn.setsockopt(zmq.SNDTIMEO, base) # A send should always be quick
self._conn.setsockopt(zmq.RCVTIMEO, 2 * base) # A receive might need to wait on processing
评论列表
文章目录