cluster.open support cluster name

This commit is contained in:
Cloud Wu
2014-06-19 16:25:50 +08:00
parent ad9898a209
commit d0468a39f4
4 changed files with 13 additions and 3 deletions

View File

@@ -9,7 +9,11 @@ function cluster.call(node, address, ...)
end
function cluster.open(port)
skynet.call(clusterd, "lua", "listen", "0.0.0.0", port)
if type(port) == "string" then
skynet.call(clusterd, "lua", "listen", port)
else
skynet.call(clusterd, "lua", "listen", "0.0.0.0", port)
end
end
skynet.init(function()