Skip to content Skip to sidebar Skip to footer

Surveyor Respondent Pattern In Nanomsg In Python

I am trying to write a surveyor respondent pattern. But it throws the error: nanomsg.NanoMsgAPIError: Operation cannot be performed in this state from nanomsg import * s1 = Soc

Solution 1:

Its a bug, it can be circumvented by inserting "time.sleep(0.1)", after the bind or connect statement.

from nanomsg import *
import time


s1 = Socket(SURVEYOR)
s1.bind('ipc://bob.ipc')
time.sleep(0.1)
s1.send(b'hello nanomsg')
print(s1.recv())
s1.close()

Post a Comment for "Surveyor Respondent Pattern In Nanomsg In Python"