cluster.open添加maxclient参数 (#1705)

This commit is contained in:
丁大龙
2023-02-18 00:57:39 +08:00
committed by GitHub
parent f344a49755
commit 6fe520a7cb
2 changed files with 6 additions and 6 deletions

View File

@@ -75,11 +75,11 @@ function cluster.send(node, address, ...)
end
end
function cluster.open(port)
function cluster.open(port, maxclient)
if type(port) == "string" then
return skynet.call(clusterd, "lua", "listen", port)
return skynet.call(clusterd, "lua", "listen", port, nil, maxclient)
else
return skynet.call(clusterd, "lua", "listen", "0.0.0.0", port)
return skynet.call(clusterd, "lua", "listen", "0.0.0.0", port, maxclient)
end
end