mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
add snax.self and snax.exit
This commit is contained in:
@@ -132,6 +132,14 @@ function snax.kill(obj, ...)
|
||||
skynet_call(obj.handle, "snax", t.system.exit, ...)
|
||||
end
|
||||
|
||||
function snax.self()
|
||||
return snax.bind(skynet.self(), SERVICE_NAME)
|
||||
end
|
||||
|
||||
function snax.exit(...)
|
||||
snax.kill(snax.self(), ...)
|
||||
end
|
||||
|
||||
local function test_result(ok, ...)
|
||||
if ok then
|
||||
return ...
|
||||
|
||||
Reference in New Issue
Block a user