tonysimpson / nanomsg-python

nanomsg wrapper for python with multiple backends (CPython and ctypes) should support 2/3 and Pypy
MIT License
382 stars 85 forks source link

nanomsg.NanoMsgAPIError: Invalid argument #75

Open supermario1990 opened 4 years ago

supermario1990 commented 4 years ago
from nanomsg import Socket, PAIR, SOL_SOCKET, RCVTIMEO
import time
s1 = Socket(PAIR)
s1.recv_timeout = 100
s1.connect('tcp://127.0.0.1:9099')

s1.recv_timeout = 100 <--- this line is wrong

Traceback (most recent call last): File "/mnt/d/mypython/mynanomsg/nanomsg_pair_linux.py", line 5, in s1.recv_timeout = 100 File "/root/.pyenv/versions/3.7.4/lib/python3.7/site-packages/nanomsg-1.0-py3.7-linux-x86_64.egg/nanomsg/init.py", line 245, in _set_recv_timeout return self.set_int_option(SOL_SOCKET, RCVTIMEO, value) File "/root/.pyenv/versions/3.7.4/lib/python3.7/site-packages/nanomsg-1.0-py3.7-linux-x86_64.egg/nanomsg/init.py", line 376, in set_int_option buf)) File "/root/.pyenv/versions/3.7.4/lib/python3.7/site-packages/nanomsg-1.0-py3.7-linux-x86_64.egg/nanomsg/init.py", line 63, in _nn_check_positive_rtn raise NanoMsgAPIError() nanomsg.NanoMsgAPIError: Invalid argument