python编写websocket长连接

from websocket import create_connection
ws = create_connection("wss://ws.xxxxxxx.info/inv")
ws.send(str({"op":"unconfirmed_sub"}))
print("Receiving...")
result = ws.recv()
print(str(result))
原文地址:https://www.cnblogs.com/slqt/p/10830416.html