add new api skynet.task()

This commit is contained in:
Cloud Wu
2014-07-07 18:29:27 +08:00
parent f874fdc618
commit ece89a1b49
4 changed files with 29 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ function COMMAND.help()
snax = "lanuch a new snax service",
clearcache = "clear lua code cache",
service = "List unique service",
task = "task address : show service task detail",
}
end

View File

@@ -38,6 +38,16 @@ function command.INFO(_, _, handle)
end
end
function command.TASK(_, _, handle)
handle = handle_to_address(handle)
if services[handle] == nil then
return
else
local result = skynet.call(handle,"debug","TASK")
return result
end
end
function command.KILL(_, _, handle)
handle = handle_to_address(handle)
skynet.kill(handle)