add socket.pause

This commit is contained in:
Cloud Wu
2020-10-12 16:12:01 +08:00
parent a87b039c6d
commit 471c7d1101

View File

@@ -229,6 +229,15 @@ function socket.start(id, func)
return connect(id, func)
end
function socket.pause(id)
local s = socket_pool[id]
if s == nil or s.pause then
return
end
driver.pause(id)
s.pause = true
end
function socket.shutdown(id)
local s = socket_pool[id]
if s then