pip install websocket-client
from websocket import create_connection
ws = create_connection("wss://localhost/", timeout=5)
if ws.connected:
ws.send('8')
print(ws.recv())
# ws.close()
pip install websocket-client
from websocket import create_connection
ws = create_connection("wss://localhost/", timeout=5)
if ws.connected:
ws.send('8')
print(ws.recv())
# ws.close()
本文标题:python 连接wss
本文链接:https://www.haomeiwen.com/subject/rrkmhftx.html
网友评论