[英]How many attempts do websocket-client's send() do?
我使用Python包websocket-client來進行一些客戶機-服務器討論。
假設我執行以下操作:
import websocket
MAX_TIMEOUT = 1 * 60 # Maximum time to wait to establish the connection to the server.
ws = websocket.create_connection("ws://128.52.195.211:8080/websocket")
ws.settimeout(MAX_TIMEOUT)
ws.send("Hello, World!")
ws.send()
將嘗試幾次嘗試將消息發送到服務器? 只有1個?
如果您查看庫源代碼 ,它將清楚地表明沒有實現重試。
ws.send
從有效負載創建幀(塊),然后在ws.send_frame
每個幀1發送一次
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.