mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
multi cluster sender
This commit is contained in:
@@ -22,11 +22,12 @@ skynet.forward_type( forward_map ,function()
|
||||
if n then
|
||||
address = n
|
||||
end
|
||||
local sender = skynet.call(clusterd, "lua", "sender", node)
|
||||
skynet.dispatch("system", function (session, source, msg, sz)
|
||||
if session == 0 then
|
||||
skynet.send(clusterd, "lua", "push", node, address, msg, sz)
|
||||
else
|
||||
skynet.ret(skynet.rawcall(clusterd, "lua", skynet.pack("req", node, address, msg, sz)))
|
||||
skynet.ret(skynet.rawcall(sender, "lua", skynet.pack("req", address, msg, sz)))
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user