314bc5df
zhengshouren
提交服务器初始代码
|
1
2
3
4
5
6
|
local skynet = require "skynet"
local max_client = 64
skynet.start(function()
print("Server start")
|
3a694834
zhengshouren
修改默认配置
|
7
|
skynet.newservice("debug_console", 10001)
|
314bc5df
zhengshouren
提交服务器初始代码
|
8
|
|
53012d9a
zhouhaihai
配置文件修改
|
9
|
local httpd = skynet.newservice("services/httpweb", 11001)
|
314bc5df
zhengshouren
提交服务器初始代码
|
10
|
local watchdog = skynet.newservice("services/watchdog", max_client)
|
3fe4471e
zhouhaihai
热更新 demo
|
11
|
|
314bc5df
zhengshouren
提交服务器初始代码
|
12
|
skynet.call(watchdog, "lua", "start", {
|
3a694834
zhengshouren
修改默认配置
|
13
|
port = 12001,
|
314bc5df
zhengshouren
提交服务器初始代码
|
14
|
maxclient = max_client,
|
3fe4471e
zhouhaihai
热更新 demo
|
15
|
httpd = httpd,
|
314bc5df
zhengshouren
提交服务器初始代码
|
16
17
|
redishost = "127.0.0.1",
|
53012d9a
zhouhaihai
配置文件修改
|
18
19
20
|
redisport = 6001,
redisdb = 0,
auth = "zhaolu6001",
|
314bc5df
zhengshouren
提交服务器初始代码
|
21
22
23
24
|
})
skynet.exit()
end)
|