mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
add socket.pause
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user