from websocket import create_connection while(1): ws = create_connection('wss://ha-cmim.cmcc-cs.cn:12501/ws/') ws.send("Hello, World") result = ws.recv() print("Received '%s'" % result)
不停建立websocket请求
from websocket import create_connection while(1): ws = create_connection('wss://ha-cmim.cmcc-cs.cn:12501/ws/') ws.send("Hello, World") result = ws.recv() print("Received '%s'" % result)
不停建立websocket请求