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