mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
report new connection from gate
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
local skynet = require "skynet"
|
||||
local client = ...
|
||||
|
||||
skynet.dispatch(function(msg, sz , session, address)
|
||||
local message = skynet.tostring(msg,sz)
|
||||
@@ -6,3 +7,7 @@ skynet.dispatch(function(msg, sz , session, address)
|
||||
local result = skynet.call("SIMPLEDB",message)
|
||||
skynet.send(address, result)
|
||||
end)
|
||||
|
||||
skynet.start(function()
|
||||
skynet.send(client,"Welcome to skynet")
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user