complete cluster.send

This commit is contained in:
Cloud Wu
2017-03-25 00:10:23 +08:00
parent 3a4a673b43
commit 6289b2b8e4
7 changed files with 90 additions and 23 deletions

View File

@@ -9,8 +9,8 @@ function cluster.call(node, address, ...)
end
function cluster.send(node, address, ...)
-- skynet.pack(...) will free by cluster.core.packrequest
skynet.send(clusterd, "lua", "req", node, address, skynet.pack(...))
-- push is the same with req, but no response
skynet.send(clusterd, "lua", "push", node, address, skynet.pack(...))
end
function cluster.open(port)

View File

@@ -362,6 +362,11 @@ function skynet.send(addr, typename, ...)
return c.send(addr, p.id, 0 , p.pack(...))
end
function skynet.rawsend(addr, typename, msg, sz)
local p = proto[typename]
return c.send(addr, p.id, 0 , msg, sz)
end
skynet.genid = assert(c.genid)
skynet.redirect = function(dest,source,typename,...)