add service manager

This commit is contained in:
云风
2012-09-07 11:04:46 +08:00
parent 87b8b664aa
commit 4c1cbaaf3e
6 changed files with 49 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
local skynet = require "skynet"
local SERVICE = "GROUPMGR"
local SERVICE
local group = {}
@@ -27,4 +27,9 @@ function group.release(id)
skynet.send(SERVICE, "lua" , "CLEAR", skynet.self(), id)
end
skynet.init(function()
SERVICE = skynet.call("SERVICE", "lua", "group_mgr")
skynet.call(".service","lua","group_agent")
end, "group")
return group