mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
add get_sender function to outside (#1832)
* add get_sender function to outside 目的是用sender结合skynet.select的超时特性,实现一个超时的cluster.call,所以希望这里能够把get_sender的接口加上 * Update cluster.lua 改为cluster.get_sender = get_sender
This commit is contained in:
@@ -55,6 +55,8 @@ local function get_sender(node)
|
||||
return s
|
||||
end
|
||||
|
||||
cluster.get_sender = get_sender
|
||||
|
||||
function cluster.call(node, address, ...)
|
||||
-- skynet.pack(...) will free by cluster.core.packrequest
|
||||
local s = sender[node]
|
||||
|
||||
Reference in New Issue
Block a user