Autobahn with sendMessage using threading and twisted
问题 From this thread (sendMessage from outside in autobahn running in separate thread) I am trying to get the code below working. But I am getting the following error: File "/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py", line 2421, in sendMessage assert(type(payload) == bytes) exceptions.AssertionError: Can anybody tell me where I am going wrong? from autobahn.twisted.websocket import WebSocketServerProtocol, WebSocketServerFactory import threading from twisted.python