add cluster.proxy and cluster.ncall

This commit is contained in:
Cloud Wu
2014-08-13 17:49:30 +08:00
parent cde423cb73
commit 978e010e67
11 changed files with 79 additions and 9 deletions

View File

@@ -60,6 +60,16 @@ function command.req(source, node, addr, msg, sz)
skynet.ret(c:request(request, session))
end
local proxy = {}
function command.proxy(source, node, name)
local fullname = node .. "." .. name
if proxy[fullname] == nil then
proxy[fullname] = skynet.newservice("clusterproxy", node, name)
end
skynet.ret(skynet.pack(proxy[fullname]))
end
local request_fd = {}
function command.socket(source, subcmd, fd, msg)