mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
watchdog returns addr,port
This commit is contained in:
@@ -12,11 +12,11 @@ skynet.start(function()
|
||||
skynet.newservice("debug_console",8000)
|
||||
skynet.newservice("simpledb")
|
||||
local watchdog = skynet.newservice("watchdog")
|
||||
skynet.call(watchdog, "lua", "start", {
|
||||
local addr,port = skynet.call(watchdog, "lua", "start", {
|
||||
port = 8888,
|
||||
maxclient = max_client,
|
||||
nodelay = true,
|
||||
})
|
||||
skynet.error("Watchdog listen on", 8888)
|
||||
skynet.error("Watchdog listen on " .. addr .. ":" .. port)
|
||||
skynet.exit()
|
||||
end)
|
||||
|
||||
@@ -40,7 +40,7 @@ function SOCKET.data(fd, msg)
|
||||
end
|
||||
|
||||
function CMD.start(conf)
|
||||
skynet.call(gate, "lua", "open" , conf)
|
||||
return skynet.call(gate, "lua", "open" , conf)
|
||||
end
|
||||
|
||||
function CMD.close(fd)
|
||||
|
||||
Reference in New Issue
Block a user