console添加切换服务器的命令

This commit is contained in:
MrZ626
2021-05-30 16:21:03 +08:00
parent 59ef90e120
commit 25ad789e61
2 changed files with 35 additions and 0 deletions

View File

@@ -233,6 +233,15 @@ local wsList=setmetatable({},{
end
})
function WS.switchHost(_1,_2,_3)
for k in next,wsList do
WS.close(k)
end
host=_1
port=_2 or port
path=_3 or path
end
function WS.connect(name,subPath,body,timeout)
local ws={
real=true,