1234567891011121314151617181920212223 |
- local skynet = require "skynet"
- local sprotoloader = require "sprotoloader"
- local max_client = 64
- skynet.start(function()
- skynet.error("Server start")
- skynet.uniqueservice("protoloader")
- if not skynet.getenv "daemon" then
- local console = skynet.newservice("console")
- end
- skynet.newservice("debug_console",8000)
- skynet.newservice("simpledb")
- local watchdog = skynet.newservice("watchdog")
- local addr,port = skynet.call(watchdog, "lua", "start", {
- port = 8888,
- maxclient = max_client,
- nodelay = true,
- })
- skynet.error("Watchdog listen on " .. addr .. ":" .. port)
- skynet.exit()
- end)
|