report new connection from gate

This commit is contained in:
云风
2012-08-09 22:06:04 +08:00
parent 24790ca5e4
commit c958a99b35
3 changed files with 16 additions and 5 deletions

View File

@@ -10,8 +10,8 @@ function command:open(parm)
local fd,addr = string.match(parm,"(%d+) ([^%s]+)")
fd = tonumber(fd)
print("agent open",self,string.format("%d %d %s",self,fd,addr))
local agent = skynet.launch("snlua","agent")
local client = skynet.launch("client",fd)
local agent = skynet.launch("snlua","agent",client)
print("watchdog launch agent client:",agent,client)
if agent then
agent_all[self] = { agent , client }