mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
local cast
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
local c = require "skynet.c"
|
||||
local mc = require "mcast.c"
|
||||
local tostring = tostring
|
||||
local tonumber = tonumber
|
||||
local coroutine = coroutine
|
||||
@@ -175,6 +176,11 @@ function skynet.send(addr, typename, ...)
|
||||
return c.send(addr, p.id, 0 , p.pack(...))
|
||||
end
|
||||
|
||||
function skynet.cast(group, typename, ...)
|
||||
local p = proto[typename]
|
||||
return c.send(".cast", p.id, 0, mc(group, p.pack(...)))
|
||||
end
|
||||
|
||||
skynet.genid = assert(c.genid)
|
||||
skynet.forward = assert(c.forward)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user