mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 19:13:07 +00:00
22 lines
511 B
Lua
22 lines
511 B
Lua
local skynet = require "skynet"
|
|
local sprotoloader = require "sprotoloader"
|
|
|
|
local max_client = 64
|
|
|
|
skynet.start(function()
|
|
print("Server start")
|
|
skynet.uniqueservice("protoloader")
|
|
local console = skynet.newservice("console")
|
|
skynet.newservice("debug_console",8000)
|
|
skynet.newservice("simpledb")
|
|
local watchdog = skynet.newservice("watchdog")
|
|
skynet.call(watchdog, "lua", "start", {
|
|
port = 8888,
|
|
maxclient = max_client,
|
|
nodelay = true,
|
|
})
|
|
print("Watchdog listen on ", 8888)
|
|
|
|
skynet.exit()
|
|
end)
|