register launcher name at skynet_start

This commit is contained in:
云风
2013-07-02 10:48:22 +08:00
parent 40c77e7739
commit 52a4ef8d13
3 changed files with 7 additions and 8 deletions

View File

@@ -77,8 +77,6 @@ end
local instance = {}
skynet.register(".launcher")
skynet.start(function()
skynet.dispatch("text" , function(session, address , cmd)
if cmd == "" then

View File

@@ -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()

View File

@@ -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);
}