與下面的腳本工作: @echo off
netsh interface show interface | find "Connected"
if errorlevel 1 goto #
netsh interface set interface "Local Area Connection" disabled
goto end
:#
netsh interface set interf
我有一系列的客戶端需要通過ws協議不斷連接到我的服務器。由於許多不同的原因,連接偶爾會下降。這是可以接受的,但是當它發生時,我希望我的客戶重新連接。 目前我的臨時解決方法是讓父進程啓動客戶端,當它檢測到連接丟失時,終止它(客戶端從不處理任何關鍵數據,不會對sigkill產生副作用),並重新創建一個新客戶端。雖然這樣做的工作,我非常希望解決實際問題。 這大致是我的客戶: from autobahn.