mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
support multi protocol
This commit is contained in:
@@ -2,12 +2,10 @@ local skynet = require "skynet"
|
||||
local group = require "mcgroup"
|
||||
local id, g = ...
|
||||
|
||||
skynet.dispatch(function (msg,sz)
|
||||
print("===>",id, skynet.tostring(msg,sz))
|
||||
end
|
||||
)
|
||||
|
||||
skynet.start(function()
|
||||
skynet.dispatch("text",function(session,address,text)
|
||||
print("===>",id, text)
|
||||
end)
|
||||
if g then
|
||||
group.enter(tonumber(g))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user