Closed peetonn closed 6 years ago
I don't think there is anything Python-specific here. I tried with the following script:
import nnpy
pub = nnpy.Socket(nnpy.AF_SP, nnpy.PUB)
print('bind', pub.bind('ipc://qwer'))
sub = nnpy.Socket(nnpy.AF_SP, nnpy.SUB)
print('connect', sub.connect('ipc://qwer'))
sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, '')
print('send', pub.send('wazup'))
print('recv', sub.recv())
This seems to hang on the receive with ipc
, but runs to completion with inproc
. So there's probably some nanomsg-internal problem. I recommend you write the equivalent C code and see if you can get that working -- if it doesn't, we can do more investigation, but it seems pretty unlikely to me the problem is in nnpy
.
(IPC could also depend on your OS, which one are you testing here? If on a Unix, the IPC name probably has to be a filesystem path, so you could try something more along the lines of ipc:///tmp/qwer
-- although that didn't resolve the problem for me on Linux.)
https://github.com/nanomsg/nanomsg/issues/824 I encountered this and solved by not exiting too quickly.
Good to hear! I'll close this.
Trying to test with IPC protocol, but messages are never received:
publisher:
subscriber:
Is there anything Python-specific for IPC I'm missing out here? I tried nanomsg-python - it doesn't work either.