我实际上正在尝试通过localhost连接使用websocket hello世界示例。
from websocket import create_connection
ws = create_connection("wss://localhost:5000/websocket", timeout=5)
print ("Sending 'Hello, World'...")
ws.send("Hello, World")
print ("Sent")
print ("Receiving...")
result = ws.recv()
print ("Received '%s'" % result)
ws.close()
我得到的错误是:
ConnectionRefusedError: [Errno 111] Connection refused
感谢您的提前帮助