mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
add socket.pause
This commit is contained in:
@@ -229,6 +229,15 @@ function socket.start(id, func)
|
|||||||
return connect(id, func)
|
return connect(id, func)
|
||||||
end
|
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)
|
function socket.shutdown(id)
|
||||||
local s = socket_pool[id]
|
local s = socket_pool[id]
|
||||||
if s then
|
if s then
|
||||||
|
|||||||
Reference in New Issue
Block a user