pong动画

This commit is contained in:
MrZ626
2021-03-28 03:35:55 +08:00
parent d34627fab6
commit b740072209
2 changed files with 9 additions and 0 deletions

View File

@@ -174,6 +174,10 @@ function WS.status(name)
return wsList[name]and wsList[name].status or"dead"
end
function WS.lastPongTime(name)
return wsList[name]and timer()-wsList[name].lastPongTime or 999
end
function WS.setPingInterval(name,time)
local ws=wsList[name]
ws.pingInterval=math.max(time or 1,2.6)