mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
register launcher name at skynet_start
This commit is contained in:
@@ -77,8 +77,6 @@ end
|
||||
|
||||
local instance = {}
|
||||
|
||||
skynet.register(".launcher")
|
||||
|
||||
skynet.start(function()
|
||||
skynet.dispatch("text" , function(session, address , cmd)
|
||||
if cmd == "" then
|
||||
|
||||
@@ -3,12 +3,12 @@ local skynet = require "skynet"
|
||||
skynet.start(function()
|
||||
print("Server start")
|
||||
skynet.launch("socket",128)
|
||||
local service = skynet.launch("snlua","service_mgr")
|
||||
local lualog = skynet.launch("snlua","lualog")
|
||||
local console = skynet.launch("snlua","console")
|
||||
local remoteroot = skynet.launch("snlua","remote_root")
|
||||
local watchdog = skynet.launch("snlua","watchdog","8888 4 0")
|
||||
local db = skynet.launch("snlua","simpledb")
|
||||
local service = skynet.newservice("service_mgr")
|
||||
local lualog = skynet.newservice("lualog")
|
||||
local console = skynet.newservice("console")
|
||||
local remoteroot = skynet.newservice("remote_root")
|
||||
local watchdog = skynet.newservice("watchdog","8888 4 0")
|
||||
local db = skynet.newservice("simpledb")
|
||||
-- skynet.launch("snlua","testgroup")
|
||||
|
||||
skynet.exit()
|
||||
|
||||
@@ -130,6 +130,7 @@ skynet_start(struct skynet_config * config) {
|
||||
}
|
||||
ctx = skynet_context_new("snlua", "launcher");
|
||||
if (ctx) {
|
||||
skynet_command(ctx, "REG", ".launcher");
|
||||
ctx = skynet_context_new("snlua", config->start);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user