# pip install websocket-client from websocket import create_connection import time ws = create_connection("ws://localhost:5000/echo") ws.send("Hello, World") b = 20 while b > 0: time.sleep(1) b-=1 result = ws.recv() print(result) ws.close()
简易python websocket client
最新推荐文章于 2024-05-17 15:11:55 发布