mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
support multi protocol
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
local skynet = require "skynet"
|
||||
|
||||
skynet.dispatch(function(msg, sz , session , from)
|
||||
local message = skynet.tostring(msg,sz)
|
||||
print("[GLOBALLOG]", skynet.address(from),message)
|
||||
skynet.start(function()
|
||||
skynet.dispatch("text", function(session, address, text)
|
||||
print("[GLOBALLOG]", skynet.address(address),text)
|
||||
end)
|
||||
skynet.register "LOG"
|
||||
end)
|
||||
|
||||
skynet.register "LOG"
|
||||
Reference in New Issue
Block a user